-
Notifications
You must be signed in to change notification settings - Fork 47.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove legacy ReactDOM APIs behind feature flag #27596
Conversation
Comparing: 8039e6d...cf0cfea Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show |
6588103
to
cf0cfea
Compare
0c0d9a3
to
348af52
Compare
348af52
to
111edd9
Compare
'instead. Until you switch to the new API, your app will behave as ' + | ||
"if it's running React 17. Learn " + | ||
'more: https://reactjs.org/link/switch-to-createroot', | ||
if (disableLegacyReactDOMRenderAPIs) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should move these errors up to ReactDOM.js, then the flag should be in the entry points. If the flag is on, they include these functions from ReactDOM. If it's off, then they import from ReactDOMLegacy. Would that work?
These APIs have been deprecated with a warning since React 17. This disables them behind a feature flag for a major release.