dillon1000/react
Commit
Browse files [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
Changed paths3 files
First-parent comparisonpackages/react-dom/src/__tests__/ReactDOMServerPartialHydration-test.internal.js ModifiedM packages/react-reconciler/src/ReactFiberHydrationContext.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…