MCPcopy
hub / github.com/facebook/react / retryTimedOutBoundary

Function retryTimedOutBoundary

packages/react-reconciler/src/ReactFiberWorkLoop.js:4852–4868  ·  view source on GitHub ↗
(boundaryFiber: Fiber, retryLane: Lane)

Source from the content-addressed store, hash-verified

4850}
4851
4852function retryTimedOutBoundary(boundaryFiber: Fiber, retryLane: Lane) {
4853 // The boundary fiber (a Suspense component or SuspenseList component)
4854 // previously was rendered in its fallback state. One of the promises that
4855 // suspended it has resolved, which means at least part of the tree was
4856 // likely unblocked. Try rendering again, at a new lanes.
4857 if (retryLane === NoLane) {
4858 // TODO: Assign this to `suspenseState.retryLane`? to avoid
4859 // unnecessary entanglement?
4860 retryLane = requestRetryLane(boundaryFiber);
4861 }
4862 // TODO: Special case idle priority?
4863 const root = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);
4864 if (root !== null) {
4865 markRootUpdated(root, retryLane);
4866 ensureRootIsScheduled(root);
4867 }
4868}
4869
4870export function retryDehydratedSuspenseBoundary(boundaryFiber: Fiber) {
4871 const suspenseState: null | SuspenseState = boundaryFiber.memoizedState;

Callers 2

resolveRetryWakeableFunction · 0.85

Calls 4

markRootUpdatedFunction · 0.90
ensureRootIsScheduledFunction · 0.90
requestRetryLaneFunction · 0.85

Tested by

no test coverage detected