Skip to content

Commit

Permalink
Add `unstable_isNewReconciler export to FB builds (#18974)
Browse files Browse the repository at this point in the history
Should check this at runtime instead of the GK
  • Loading branch information
acdlite authored May 21, 2020
1 parent 4a3f779 commit f9bf828
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/react-dom/index.classic.fb.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ export {
unstable_renderSubtreeIntoContainer,
unstable_createPortal,
unstable_createEventHandle,
unstable_isNewReconciler,
} from './src/client/ReactDOM';
1 change: 1 addition & 0 deletions packages/react-dom/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ export {
unstable_renderSubtreeIntoContainer,
unstable_createPortal,
unstable_createEventHandle,
unstable_isNewReconciler,
} from './src/client/ReactDOM';
1 change: 1 addition & 0 deletions packages/react-dom/index.modern.fb.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ export {
unstable_flushControlled,
unstable_scheduleHydration,
unstable_createEventHandle,
unstable_isNewReconciler,
} from './src/client/ReactDOM';
7 changes: 6 additions & 1 deletion packages/react-dom/src/client/ReactDOM.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ import {
} from 'legacy-events/EventPluginRegistry';
import ReactVersion from 'shared/ReactVersion';
import invariant from 'shared/invariant';
import {warnUnstableRenderSubtreeIntoContainer} from 'shared/ReactFeatureFlags';
import {
warnUnstableRenderSubtreeIntoContainer,
enableNewReconciler,
} from 'shared/ReactFeatureFlags';

import {
getInstanceFromNode,
Expand Down Expand Up @@ -246,3 +249,5 @@ if (__DEV__) {
}
}
}

export const unstable_isNewReconciler = enableNewReconciler;

0 comments on commit f9bf828

Please sign in to comment.