bailoutOnAlreadyFinishedWork() — react Function Reference
Architecture documentation for the bailoutOnAlreadyFinishedWork() function in ReactFiberBeginWork.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 6cb202e6_76dc_0479_ff31_d0ef23610882["bailoutOnAlreadyFinishedWork()"] 0be70812_cc0c_b210_f84f_8e61dd5f831c["ReactFiberBeginWork.js"] 6cb202e6_76dc_0479_ff31_d0ef23610882 -->|defined in| 0be70812_cc0c_b210_f84f_8e61dd5f831c f3abfeea_868f_5c8e_9744_74c9973ded12["updateForwardRef()"] f3abfeea_868f_5c8e_9744_74c9973ded12 -->|calls| 6cb202e6_76dc_0479_ff31_d0ef23610882 a032b50f_d1ac_c367_9f15_394d8f0023c1["updateMemoComponent()"] a032b50f_d1ac_c367_9f15_394d8f0023c1 -->|calls| 6cb202e6_76dc_0479_ff31_d0ef23610882 d5867db8_c86c_35f1_776d_f9f063826e18["updateSimpleMemoComponent()"] d5867db8_c86c_35f1_776d_f9f063826e18 -->|calls| 6cb202e6_76dc_0479_ff31_d0ef23610882 50e17875_d138_1098_df3a_5e5668c9be3d["updateFunctionComponent()"] 50e17875_d138_1098_df3a_5e5668c9be3d -->|calls| 6cb202e6_76dc_0479_ff31_d0ef23610882 dfac1880_449a_ca3a_3037_ca7205fa8fa7["replayFunctionComponent()"] dfac1880_449a_ca3a_3037_ca7205fa8fa7 -->|calls| 6cb202e6_76dc_0479_ff31_d0ef23610882 fec6f182_8acb_a259_b114_e6d1db8ac64b["finishClassComponent()"] fec6f182_8acb_a259_b114_e6d1db8ac64b -->|calls| 6cb202e6_76dc_0479_ff31_d0ef23610882 53f55fda_e2b6_2801_4fbc_525f8828d23d["updateHostRoot()"] 53f55fda_e2b6_2801_4fbc_525f8828d23d -->|calls| 6cb202e6_76dc_0479_ff31_d0ef23610882 67acc598_7202_395c_2c4c_b3d6de49d490["cloneChildFibers()"] 6cb202e6_76dc_0479_ff31_d0ef23610882 -->|calls| 67acc598_7202_395c_2c4c_b3d6de49d490 style 6cb202e6_76dc_0479_ff31_d0ef23610882 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-reconciler/src/ReactFiberBeginWork.js lines 3762–3801
function bailoutOnAlreadyFinishedWork(
current: Fiber | null,
workInProgress: Fiber,
renderLanes: Lanes,
): Fiber | null {
if (current !== null) {
// Reuse previous dependencies
workInProgress.dependencies = current.dependencies;
}
if (enableProfilerTimer) {
// Don't update "base" render times for bailouts.
stopProfilerTimerIfRunning(workInProgress);
}
markSkippedUpdateLanes(workInProgress.lanes);
// Check if the children have any pending work.
if (!includesSomeLane(renderLanes, workInProgress.childLanes)) {
// The children don't have any work either. We can skip them.
// TODO: Once we add back resuming, we should check if the children are
// a work-in-progress set. If so, we need to transfer their effects.
if (current !== null) {
// Before bailing out, check if there are any context changes in
// the children.
lazilyPropagateParentContextChanges(current, workInProgress, renderLanes);
if (!includesSomeLane(renderLanes, workInProgress.childLanes)) {
return null;
}
} else {
return null;
}
}
// This fiber doesn't have work, but its subtree does. Clone the child
// fibers and continue.
cloneChildFibers(current, workInProgress);
return workInProgress.child;
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does bailoutOnAlreadyFinishedWork() do?
bailoutOnAlreadyFinishedWork() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberBeginWork.js.
Where is bailoutOnAlreadyFinishedWork() defined?
bailoutOnAlreadyFinishedWork() is defined in packages/react-reconciler/src/ReactFiberBeginWork.js at line 3762.
What does bailoutOnAlreadyFinishedWork() call?
bailoutOnAlreadyFinishedWork() calls 1 function(s): cloneChildFibers.
What calls bailoutOnAlreadyFinishedWork()?
bailoutOnAlreadyFinishedWork() is called by 7 function(s): finishClassComponent, replayFunctionComponent, updateForwardRef, updateFunctionComponent, updateHostRoot, updateMemoComponent, updateSimpleMemoComponent.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free