dillon1000/react

Commit

Add dedicated LanePriority for Suspense retries (#19287)

A "retry" is a special type of update that attempts to flip a Suspense
boundary from its placeholder state back to its primary/resolved state.

Currently, retries are given default priority, using the same algorithm
as normal updates and occupying range of lanes.

This adds a new range of lanes dedicated specifically to retries, and
gives them lower priority than normal updates.

A couple of existing tests were affected because retries are no longer
batched with normal updates; they commit in separate batches.

Not totally satisfied with this design, but I think things will snap more
into place once the rest of the Lanes changes (like how we handle
parallel Suspense transitions) have settled.
Browse files
Changed paths6 files
First-parent comparison
M packages/react-reconciler/src/ReactFiberLane.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.new.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.old.js ModifiedM packages/react-reconciler/src/__tests__/ReactSuspenseCallback-test.internal.js ModifiedM packages/react-reconciler/src/__tests__/ReactSuspenseWithNoopRenderer-test.js ModifiedM packages/react/src/__tests__/ReactProfiler-test.internal.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…