From bb2f4a9bb759c6db798996f1cf026c02906fba78 Mon Sep 17 00:00:00 2001 From: bubucuo <276185876@qq.com> Date: Tue, 30 Aug 2022 18:02:24 +0800 Subject: [PATCH] Refactor: its type is Container --- packages/react-reconciler/src/ReactFiberRoot.new.js | 3 ++- packages/react-reconciler/src/ReactFiberRoot.old.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/react-reconciler/src/ReactFiberRoot.new.js b/packages/react-reconciler/src/ReactFiberRoot.new.js index 892fe78ac1b1e..beaa5f509bc95 100644 --- a/packages/react-reconciler/src/ReactFiberRoot.new.js +++ b/packages/react-reconciler/src/ReactFiberRoot.new.js @@ -15,6 +15,7 @@ import type { } from './ReactInternalTypes'; import type {RootTag} from './ReactRootTags'; import type {Cache} from './ReactFiberCacheComponent.new'; +import type {Container} from './ReactFiberHostConfig'; import {noTimeout, supportsHydration} from './ReactFiberHostConfig'; import {createHostRootFiber} from './ReactFiber.new'; @@ -128,7 +129,7 @@ function FiberRootNode( } export function createFiberRoot( - containerInfo: any, + containerInfo: Container, tag: RootTag, hydrate: boolean, initialChildren: ReactNodeList, diff --git a/packages/react-reconciler/src/ReactFiberRoot.old.js b/packages/react-reconciler/src/ReactFiberRoot.old.js index f7e16f0bbdcc8..11221f86a8f4c 100644 --- a/packages/react-reconciler/src/ReactFiberRoot.old.js +++ b/packages/react-reconciler/src/ReactFiberRoot.old.js @@ -15,6 +15,7 @@ import type { } from './ReactInternalTypes'; import type {RootTag} from './ReactRootTags'; import type {Cache} from './ReactFiberCacheComponent.old'; +import type {Container} from './ReactFiberHostConfig'; import {noTimeout, supportsHydration} from './ReactFiberHostConfig'; import {createHostRootFiber} from './ReactFiber.old'; @@ -128,7 +129,7 @@ function FiberRootNode( } export function createFiberRoot( - containerInfo: any, + containerInfo: Container, tag: RootTag, hydrate: boolean, initialChildren: ReactNodeList,