dillon1000/react

Commit

Hydration errors should force a client render (#22416)

* Refactor throwException control flow

I'm about to add more branches to the Suspense-related logic in
`throwException`, so before I do, I split some of the steps into
separate functions so that later I can use them in multiple places.

This commit does not change any program behavior, only the control flow
surrounding existing code.

* Hydration errors should force a client render

If something errors during hydration, we should try rendering again
without hydrating.

We'll find the nearest Suspense boundary and force it to client render,
discarding the server-rendered content.
Browse files
Changed paths6 files
First-parent comparison
M packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js ModifiedM packages/react-reconciler/src/ReactFiberBeginWork.new.js ModifiedM packages/react-reconciler/src/ReactFiberBeginWork.old.js ModifiedM packages/react-reconciler/src/ReactFiberFlags.js ModifiedM packages/react-reconciler/src/ReactFiberThrow.new.js ModifiedM packages/react-reconciler/src/ReactFiberThrow.old.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…