Skip to content

Disallow comments as DOM containers for createRoot#23321

Merged
acdlite merged 1 commit into
react:mainfrom
acdlite:no-comment-containers
Feb 17, 2022
Merged

Disallow comments as DOM containers for createRoot#23321
acdlite merged 1 commit into
react:mainfrom
acdlite:no-comment-containers

Conversation

@acdlite

@acdlite acdlite commented Feb 17, 2022

Copy link
Copy Markdown
Collaborator

This is an old feature that we no longer support. hydrateRoot already throws if you pass a comment node; this change makes createRoot throw, too.

Still enabled in the Facebook build until we migrate the callers.

This is an old feature that we no longer support. `hydrateRoot` already
throws if you pass a comment node; this change makes `createRoot`
throw, too.

Still enabled in the Facebook build until we migrate the callers.
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Feb 17, 2022
@sizebot

sizebot commented Feb 17, 2022

Copy link
Copy Markdown

Comparing: 79ed5e1...38f7b98

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 = 130.77 kB 130.77 kB = 41.90 kB 41.90 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 135.75 kB 135.75 kB = 43.40 kB 43.39 kB
facebook-www/ReactDOM-prod.classic.js +0.02% 432.15 kB 432.25 kB = 79.27 kB 79.27 kB
facebook-www/ReactDOM-prod.modern.js = 422.07 kB 421.97 kB = 77.81 kB 77.78 kB
facebook-www/ReactDOMForked-prod.classic.js +0.02% 432.15 kB 432.25 kB = 79.28 kB 79.27 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 38f7b98

@acdlite
acdlite merged commit 54f785b into react:main Feb 17, 2022
facebook-github-bot pushed a commit to react/react-native that referenced this pull request Feb 24, 2022
Summary:
This sync includes the following changes:
- **[4de99b3](react/react@4de99b3ca )**: fix getSnapshot warning when a selector returns NaN ([#23333](react/react#23333)) //<OGURA Daiki>//
- **[40eaa22](react/react@40eaa22d9 )**: Remove dependency on Offscreen Fiber updateQueue for React Cache ([#23229](react/react#23229)) //<Luna Ruan>//
- **[caf6d47](react/react@caf6d4707 )**: Enable enableCache on Test Renderer native ([#23314](react/react#23314)) //<David McCabe>//
- **[419ccc2](react/react@419ccc2b1 )**: Land skipUnmountedBoundaries experiment ([#23322](react/react#23322)) //<Andrew Clark>//
- **[54f785b](react/react@54f785bc5 )**: Disallow comments as DOM containers for createRoot ([#23321](react/react#23321)) //<Andrew Clark>//
- **[e9aa959](react/react@e9aa9592c )**: change ReactBatchConfig.transition //<Luna Ruan>//
- **[51c8411](react/react@51c8411d9 )**: Log a recoverable error whenever hydration fails ([#23319](react/react#23319)) //<Andrew Clark>//
- **[79ed5e1](react/react@79ed5e18f )**: Delete vestigial RetryAfterError logic ([#23312](react/react#23312)) //<Andrew Clark>//
- **[80059bb](react/react@80059bb73 )**: Switch to client rendering if root receives update ([#23309](react/react#23309)) //<Andrew Clark>//
- **[f7f7ed0](react/react@f7f7ed089 )**: Allow suspending in the shell during hydration ([#23304](react/react#23304)) //<Andrew Clark>//

Changelog:
[General][Changed] - React Native sync for revisions 27b5699...4de99b3

jest_e2e[run_all_tests]

Reviewed By: rickhanlonii

Differential Revision: D34399162

fbshipit-source-id: 5c49e2bdcf63eb6a601cfa6a4e4b8f2e1f83e2dd
zhengjitf pushed a commit to zhengjitf/react that referenced this pull request Apr 15, 2022
This is an old feature that we no longer support. `hydrateRoot` already
throws if you pass a comment node; this change makes `createRoot`
throw, too.

Still enabled in the Facebook build until we migrate the callers.
Saadnajmi pushed a commit to Saadnajmi/react-native-macos that referenced this pull request Jan 15, 2023
Summary:
This sync includes the following changes:
- **[4de99b3](react/react@4de99b3ca )**: fix getSnapshot warning when a selector returns NaN ([react#23333](react/react#23333)) //<OGURA Daiki>//
- **[40eaa22](react/react@40eaa22d9 )**: Remove dependency on Offscreen Fiber updateQueue for React Cache ([react#23229](react/react#23229)) //<Luna Ruan>//
- **[caf6d47](react/react@caf6d4707 )**: Enable enableCache on Test Renderer native ([react#23314](react/react#23314)) //<David McCabe>//
- **[419ccc2](react/react@419ccc2b1 )**: Land skipUnmountedBoundaries experiment ([react#23322](react/react#23322)) //<Andrew Clark>//
- **[54f785b](react/react@54f785bc5 )**: Disallow comments as DOM containers for createRoot ([react#23321](react/react#23321)) //<Andrew Clark>//
- **[e9aa959](react/react@e9aa9592c )**: change ReactBatchConfig.transition //<Luna Ruan>//
- **[51c8411](react/react@51c8411d9 )**: Log a recoverable error whenever hydration fails ([react#23319](react/react#23319)) //<Andrew Clark>//
- **[79ed5e1](react/react@79ed5e18f )**: Delete vestigial RetryAfterError logic ([react#23312](react/react#23312)) //<Andrew Clark>//
- **[80059bb](react/react@80059bb73 )**: Switch to client rendering if root receives update ([react#23309](react/react#23309)) //<Andrew Clark>//
- **[f7f7ed0](react/react@f7f7ed089 )**: Allow suspending in the shell during hydration ([react#23304](react/react#23304)) //<Andrew Clark>//

Changelog:
[General][Changed] - React Native sync for revisions 27b5699...4de99b3

jest_e2e[run_all_tests]

Reviewed By: rickhanlonii

Differential Revision: D34399162

fbshipit-source-id: 5c49e2bdcf63eb6a601cfa6a4e4b8f2e1f83e2dd
mrizwanashiq pushed a commit to mrizwanashiq/react that referenced this pull request Jun 25, 2026
This is an old feature that we no longer support. `hydrateRoot` already
throws if you pass a comment node; this change makes `createRoot`
throw, too.

Still enabled in the Facebook build until we migrate the callers.
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