dillon1000/react

Commit

[Fiber] Correctly handle replaying when hydrating (#35494)

When hydrating if something suspends and then resolves in a microtask it
is possible that React will resume the render without fully unwinding
work in progress. This can cause hydration cursors to be offset and lead
to hydration errors. This change adds a restore step when replaying
HostComponent to ensure the hydration cursor is in the appropriate
position when replaying.

fixes: #35210
Browse files
Changed paths3 files
First-parent comparison
M packages/react-dom/src/__tests__/ReactDOMServerPartialHydration-test.internal.js ModifiedM packages/react-reconciler/src/ReactFiberHydrationContext.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…