[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

kassens
Copy link
Member
@kassens kassens commented Oct 26, 2023

These APIs have been deprecated with a warning since React 17. This disables them behind a feature flag for a major release.

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Oct 26, 2023
@react-sizebot
Copy link
react-sizebot commented Oct 26, 2023

Comparing: 8039e6d...cf0cfea

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 175.09 kB 173.72 kB = 54.47 kB 54.16 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 177.21 kB 175.84 kB = 55.16 kB 54.85 kB
facebook-www/ReactDOM-prod.classic.js = 567.70 kB 567.74 kB = 99.96 kB 99.96 kB
facebook-www/ReactDOM-prod.modern.js = 551.56 kB 551.56 kB = 97.05 kB 97.05 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/react-dom/umd/react-dom.profiling.min.js = 185.99 kB 184.64 kB = 57.83 kB 57.45 kB
oss-experimental/react-dom/cjs/react-dom.profiling.min.js = 186.89 kB 185.52 kB = 57.60 kB 57.31 kB
oss-stable/react-dom/umd/react-dom.profiling.min.js = 183.88 kB 182.53 kB = 57.15 kB 56.80 kB
oss-stable-semver/react-dom/umd/react-dom.profiling.min.js = 183.80 kB 182.45 kB = 57.12 kB 56.78 kB
oss-stable/react-dom/cjs/react-dom.profiling.min.js = 184.76 kB 183.39 kB = 56.94 kB 56.64 kB
oss-stable-semver/react-dom/cjs/react-dom.profiling.min.js = 184.68 kB 183.32 kB = 56.91 kB 56.61 kB
oss-experimental/react-dom/cjs/react-dom-unstable_testing.production.min.js = 183.42 kB 182.05 kB = 57.53 kB 57.22 kB
oss-experimental/react-dom/cjs/react-dom-unstable_testing.development.js = 1,360.39 kB 1,350.12 kB = 300.53 kB 298.72 kB
oss-experimental/react-dom/umd/react-dom.development.js = 1,406.91 kB 1,396.20 kB = 299.20 kB 297.36 kB
oss-experimental/react-dom/umd/react-dom.production.min.js = 176.96 kB 175.61 kB = 55.39 kB 55.02 kB
oss-experimental/react-dom/cjs/react-dom.development.js = 1,342.34 kB 1,332.07 kB = 296.17 kB 294.35 kB
oss-stable/react-dom/umd/react-dom.development.js = 1,393.12 kB 1,382.41 kB = 296.71 kB 294.87 kB
oss-stable-semver/react-dom/umd/react-dom.development.js = 1,393.09 kB 1,382.38 kB = 296.68 kB 294.85 kB
oss-stable/react-dom/cjs/react-dom.development.js = 1,329.22 kB 1,318.95 kB = 293.74 kB 291.92 kB
oss-stable-semver/react-dom/cjs/react-dom.development.js = 1,329.19 kB 1,318.92 kB = 293.71 kB 291.89 kB
oss-stable/react-dom/umd/react-dom.production.min.js = 174.85 kB 173.50 kB = 54.76 kB 54.42 kB
oss-stable-semver/react-dom/umd/react-dom.production.min.js = 174.77 kB 173.42 kB = 54.73 kB 54.40 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 177.21 kB 175.84 kB = 55.16 kB 54.85 kB
oss-stable/react-dom/cjs/react-dom.production.min.js = 175.09 kB 173.72 kB = 54.47 kB 54.16 kB
oss-stable-semver/react-dom/cjs/react-dom.production.min.js = 175.01 kB 173.64 kB = 54.45 kB 54.13 kB

Generated by 🚫 dangerJS against cf0cfea

@kassens kassens force-pushed the disable-legacy-react-dom-apis branch 2 times, most recently from 6588103 to cf0cfea Compare October 27, 2023 00:26
@kassens kassens force-pushed the disable-legacy-react-dom-apis branch 2 times, most recently from 0c0d9a3 to 348af52 Compare December 4, 2023 23:26
@kassens kassens marked this pull request as ready for review December 5, 2023 00:03
@kassens kassens marked this pull request as draft December 5, 2023 00:04
@kassens kassens force-pushed the disable-legacy-react-dom-apis branch from 348af52 to 111edd9 Compare December 12, 2023 18:49
'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) {
Copy link
Member

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?

@kassens kassens closed this Apr 2, 2024
@kassens kassens deleted the disable-legacy-react-dom-apis branch April 2, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants