dillon1000/react
Commit
Browse files [Re-land] Make prerendering always non-blocking (#31268)
Follows https://github.com/facebook/react/pull/31238 ___ This is a partial re-land of https://github.com/facebook/react/pull/31056. We saw breakages surface after the original land and had to revert. Now that they've been fixed, let's try this again. This time we'll split up the commits to give us more control of testing and rollout internally. Original PR: https://github.com/facebook/react/pull/31056 Original Commit: https://github.com/facebook/react/pull/31056/commits/4c71025d8d1bd46344ad793e7ed3049d24f7395a Revert PR: https://github.com/facebook/react/pull/31080 Commit description: > When a synchronous update suspends, and we prerender the siblings, the prerendering should be non-blocking so that we can immediately restart once the data arrives. > > This happens automatically when there's a Suspense boundary, because we immediately commit the boundary and then proceed to a Retry render, which are always concurrent. When there's not a Suspense boundary, there is no Retry, so we need to take care to switch from the synchronous work loop to the concurrent one, to enable time slicing. Co-authored-by: Andrew Clark <[email protected]>
Changed paths6 files
First-parent comparisonpackages/react-dom/src/__tests__/ReactDOMFiberAsync-test.js ModifiedM packages/react-reconciler/src/ReactFiberLane.js ModifiedM packages/react-reconciler/src/ReactFiberRootScheduler.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.js ModifiedM packages/react-reconciler/src/__tests__/ReactDeferredValue-test.js ModifiedM packages/react-reconciler/src/__tests__/ReactSiblingPrerendering-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…