@@ -50,12 +50,7 @@ import {canUseDOM} from 'shared/ExecutionEnvironment';
5050import ReactVersion from 'shared/ReactVersion' ;
5151import { enableNewReconciler } from 'shared/ReactFeatureFlags' ;
5252
53- import {
54- getInstanceFromNode ,
55- getNodeFromInstance ,
56- getFiberCurrentPropsFromNode ,
57- getClosestInstanceFromNode ,
58- } from './ReactDOMComponentTree' ;
53+ import { getClosestInstanceFromNode } from './ReactDOMComponentTree' ;
5954import { restoreControlledState } from './ReactDOMComponent' ;
6055import {
6156 setAttemptSynchronousHydration ,
@@ -66,11 +61,8 @@ import {
6661 setAttemptHydrationAtPriority ,
6762} from '../events/ReactDOMEventReplaying' ;
6863import { setBatchingImplementation } from '../events/ReactDOMUpdateBatching' ;
69- import {
70- setRestoreImplementation ,
71- enqueueStateRestore ,
72- restoreStateIfNeeded ,
73- } from '../events/ReactDOMControlledComponent' ;
64+ import { setRestoreImplementation } from '../events/ReactDOMControlledComponent' ;
65+ import Internals from '../ReactDOMSharedInternals' ;
7466
7567setAttemptSynchronousHydration ( attemptSynchronousHydration ) ;
7668setAttemptDiscreteHydration ( attemptDiscreteHydration ) ;
@@ -133,20 +125,6 @@ function renderSubtreeIntoContainer(
133125 ) ;
134126}
135127
136- const Internals = {
137- usingClientEntryPoint : false ,
138- // Keep in sync with ReactTestUtils.js.
139- // This is an array for better minification.
140- Events : [
141- getInstanceFromNode ,
142- getNodeFromInstance ,
143- getFiberCurrentPropsFromNode ,
144- enqueueStateRestore ,
145- restoreStateIfNeeded ,
146- batchedUpdates ,
147- ] ,
148- } ;
149-
150128function createRoot (
151129 container : Element | Document | DocumentFragment ,
152130 options ?: CreateRootOptions ,
@@ -201,7 +179,6 @@ export {
201179 createPortal ,
202180 batchedUpdates as unstable_batchedUpdates ,
203181 flushSync ,
204- Internals as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ,
205182 ReactVersion as version ,
206183 // Disabled behind disableLegacyReactDOMAPIs
207184 findDOMNode ,
0 commit comments