mountSuspenseFallbackChildren() — react Function Reference
Architecture documentation for the mountSuspenseFallbackChildren() function in ReactFiberBeginWork.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 947327cb_b1cb_648e_e70d_a596b230d0c5["mountSuspenseFallbackChildren()"] 0be70812_cc0c_b210_f84f_8e61dd5f831c["ReactFiberBeginWork.js"] 947327cb_b1cb_648e_e70d_a596b230d0c5 -->|defined in| 0be70812_cc0c_b210_f84f_8e61dd5f831c f4acdab6_f680_af63_8940_0259a68c2f48["updateSuspenseComponent()"] f4acdab6_f680_af63_8940_0259a68c2f48 -->|calls| 947327cb_b1cb_648e_e70d_a596b230d0c5 9a90515d_1b46_45ee_c1be_ce882bad30b7["mountWorkInProgressOffscreenFiber()"] 947327cb_b1cb_648e_e70d_a596b230d0c5 -->|calls| 9a90515d_1b46_45ee_c1be_ce882bad30b7 style 947327cb_b1cb_648e_e70d_a596b230d0c5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-reconciler/src/ReactFiberBeginWork.js lines 2631–2694
function mountSuspenseFallbackChildren(
workInProgress: Fiber,
primaryChildren: $FlowFixMe,
fallbackChildren: $FlowFixMe,
renderLanes: Lanes,
) {
const mode = workInProgress.mode;
const progressedPrimaryFragment: Fiber | null = workInProgress.child;
const primaryChildProps: OffscreenProps = {
mode: 'hidden',
children: primaryChildren,
};
let primaryChildFragment;
let fallbackChildFragment;
if (
!disableLegacyMode &&
(mode & ConcurrentMode) === NoMode &&
progressedPrimaryFragment !== null
) {
// In legacy mode, we commit the primary tree as if it successfully
// completed, even though it's in an inconsistent state.
primaryChildFragment = progressedPrimaryFragment;
primaryChildFragment.childLanes = NoLanes;
primaryChildFragment.pendingProps = primaryChildProps;
if (enableProfilerTimer && workInProgress.mode & ProfileMode) {
// Reset the durations from the first pass so they aren't included in the
// final amounts. This seems counterintuitive, since we're intentionally
// not measuring part of the render phase, but this makes it match what we
// do in Concurrent Mode.
primaryChildFragment.actualDuration = -0;
primaryChildFragment.actualStartTime = -1.1;
primaryChildFragment.selfBaseDuration = -0;
primaryChildFragment.treeBaseDuration = -0;
}
fallbackChildFragment = createFiberFromFragment(
fallbackChildren,
mode,
renderLanes,
null,
);
} else {
primaryChildFragment = mountWorkInProgressOffscreenFiber(
primaryChildProps,
mode,
NoLanes,
);
fallbackChildFragment = createFiberFromFragment(
fallbackChildren,
mode,
renderLanes,
null,
);
}
primaryChildFragment.return = workInProgress;
fallbackChildFragment.return = workInProgress;
primaryChildFragment.sibling = fallbackChildFragment;
workInProgress.child = primaryChildFragment;
return fallbackChildFragment;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does mountSuspenseFallbackChildren() do?
mountSuspenseFallbackChildren() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberBeginWork.js.
Where is mountSuspenseFallbackChildren() defined?
mountSuspenseFallbackChildren() is defined in packages/react-reconciler/src/ReactFiberBeginWork.js at line 2631.
What does mountSuspenseFallbackChildren() call?
mountSuspenseFallbackChildren() calls 1 function(s): mountWorkInProgressOffscreenFiber.
What calls mountSuspenseFallbackChildren()?
mountSuspenseFallbackChildren() is called by 1 function(s): updateSuspenseComponent.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free