propagateSuspenseContextChange() — react Function Reference
Architecture documentation for the propagateSuspenseContextChange() function in ReactFiberBeginWork.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 1da57ff0_4ff1_c9eb_b5e4_92617b9e5d40["propagateSuspenseContextChange()"] 0be70812_cc0c_b210_f84f_8e61dd5f831c["ReactFiberBeginWork.js"] 1da57ff0_4ff1_c9eb_b5e4_92617b9e5d40 -->|defined in| 0be70812_cc0c_b210_f84f_8e61dd5f831c 52177215_eced_b9dc_62cc_32297ae94438["updateSuspenseListComponent()"] 52177215_eced_b9dc_62cc_32297ae94438 -->|calls| 1da57ff0_4ff1_c9eb_b5e4_92617b9e5d40 a5443cc9_f5de_e971_3e40_eab4363f2e3d["scheduleSuspenseWorkOnFiber()"] 1da57ff0_4ff1_c9eb_b5e4_92617b9e5d40 -->|calls| a5443cc9_f5de_e971_3e40_eab4363f2e3d style 1da57ff0_4ff1_c9eb_b5e4_92617b9e5d40 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-reconciler/src/ReactFiberBeginWork.js lines 3174–3216
function propagateSuspenseContextChange(
workInProgress: Fiber,
firstChild: null | Fiber,
renderLanes: Lanes,
): void {
// Mark any Suspense boundaries with fallbacks as having work to do.
// If they were previously forced into fallbacks, they may now be able
// to unblock.
let node = firstChild;
while (node !== null) {
if (node.tag === SuspenseComponent) {
const state: SuspenseState | null = node.memoizedState;
if (state !== null) {
scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress);
}
} else if (node.tag === SuspenseListComponent) {
// If the tail is hidden there might not be an Suspense boundaries
// to schedule work on. In this case we have to schedule it on the
// list itself.
// We don't have to traverse to the children of the list since
// the list will propagate the change when it rerenders.
scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress);
} else if (node.child !== null) {
node.child.return = node;
node = node.child;
continue;
}
if (node === workInProgress) {
return;
}
// $FlowFixMe[incompatible-use] found when upgrading Flow
while (node.sibling === null) {
// $FlowFixMe[incompatible-use] found when upgrading Flow
if (node.return === null || node.return === workInProgress) {
return;
}
node = node.return;
}
// $FlowFixMe[incompatible-use] found when upgrading Flow
node.sibling.return = node.return;
node = node.sibling;
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does propagateSuspenseContextChange() do?
propagateSuspenseContextChange() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberBeginWork.js.
Where is propagateSuspenseContextChange() defined?
propagateSuspenseContextChange() is defined in packages/react-reconciler/src/ReactFiberBeginWork.js at line 3174.
What does propagateSuspenseContextChange() call?
propagateSuspenseContextChange() calls 1 function(s): scheduleSuspenseWorkOnFiber.
What calls propagateSuspenseContextChange()?
propagateSuspenseContextChange() is called by 1 function(s): updateSuspenseListComponent.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free