dillon1000/react
Commit
Browse files Make prerendering always non-blocking (#31056)
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.
Changed paths7 files
First-parent comparisonpackages/react-dom/src/__tests__/ReactDOMFiberAsync-test.js ModifiedM packages/react-reconciler/src/ReactFiberCompleteWork.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…