The Wayback Machine - https://web.archive.org/web/20220227014844/https://github.com/facebook/react/pull/23364
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

Fix false positive hydration warnings #23364

Merged
merged 2 commits into from Feb 25, 2022

Conversation

@acdlite
Copy link
Member

@acdlite acdlite commented Feb 25, 2022

When something suspends during hydration, we continue rendering the siblings to warm up the cache and fire off any lazy network requests. However, if there are any mismatches while rendering the siblings, it's likely a false positive caused by the earlier suspended component. So we should suppress any hydration warnings until the tree no longer suspends.

Fixes #23332

@sizebot
Copy link

@sizebot sizebot commented Feb 25, 2022

Comparing: 5d08a24...be112b2

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 = 131.32 kB 131.31 kB = 42.01 kB 42.00 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 136.15 kB 136.13 kB = 43.43 kB 43.42 kB
facebook-www/ReactDOM-prod.classic.js = 434.32 kB 434.11 kB = 79.42 kB 79.40 kB
facebook-www/ReactDOM-prod.modern.js = 421.06 kB 420.61 kB = 77.41 kB 77.37 kB
facebook-www/ReactDOMForked-prod.classic.js = 434.32 kB 434.11 kB = 79.42 kB 79.40 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against be112b2

When something suspends during hydration, we continue rendering the
siblings to warm up the cache and fire off any lazy network requests.
However, if there are any mismatches while rendering the siblings, it's
likely a false positive caused by the earlier suspended component. So
we should suppress any hydration warnings until the tree no
longer suspends.

Fixes facebook#23332
@acdlite acdlite force-pushed the fix-false-positive-hydration-warnings branch from 67dd1a2 to be112b2 Feb 25, 2022
@acdlite acdlite merged commit f468816 into facebook:main Feb 25, 2022
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment