dillon1000/react
Commit
Browse files Fix false positive hydration warnings (#23364)
* Failing test for react#23331 * Don't warn on hydration mismatch if suspended 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 Co-authored-by: Marcel Laverdet <[email protected]>
Changed paths7 files
First-parent comparisonpackages/react-dom/src/__tests__/ReactDOMFizzServer-test.js ModifiedM packages/react-dom/src/client/ReactDOMComponent.js ModifiedM packages/react-dom/src/client/ReactDOMHostConfig.js ModifiedM packages/react-reconciler/src/ReactFiberHydrationContext.new.js ModifiedM packages/react-reconciler/src/ReactFiberHydrationContext.old.js ModifiedM packages/react-reconciler/src/ReactFiberThrow.new.js ModifiedM packages/react-reconciler/src/ReactFiberThrow.old.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…