dillon1000/react
Commit
Browse files Track entangled lanes separately from update lane (#27505)
A small refactor to how the lane entanglement mechanism works. We can now distinguish between the lane that "spawned" a render task (i.e. a new update) versus the lanes that it's entangled with. Both the update lane and the entangled lanes will be included while rendering, but by keeping them separate, we don't lose the original priority. In practical terms, this means we can now entangle a low priority update with a higher priority lane while rendering at the lower priority. To do this, lanes that are entangled at the root are now tracked using the same variable that we use to track the "base lanes" when revealing a previously hidden tree — conceptually, they are the same thing. I also renamed this variable (from subtreeLanes to entangledRenderLanes) to better reflect how it's used. My primary motivation is related to useDeferredValue, which I'll address in a later PR.
Changed paths6 files
First-parent comparisonpackages/react-dom/src/__tests__/ReactDOMFiberAsync-test.js ModifiedM packages/react-reconciler/src/ReactFiberHiddenContext.js ModifiedM packages/react-reconciler/src/ReactFiberHooks.js ModifiedM packages/react-reconciler/src/ReactFiberLane.js ModifiedM packages/react-reconciler/src/ReactFiberRootScheduler.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…