attemptEarlyBailoutIfNoScheduledUpdate() — react Function Reference
Architecture documentation for the attemptEarlyBailoutIfNoScheduledUpdate() function in ReactFiberBeginWork.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD df2c7818_4611_b8d2_dfe8_a79e5972020c["attemptEarlyBailoutIfNoScheduledUpdate()"] 0be70812_cc0c_b210_f84f_8e61dd5f831c["ReactFiberBeginWork.js"] df2c7818_4611_b8d2_dfe8_a79e5972020c -->|defined in| 0be70812_cc0c_b210_f84f_8e61dd5f831c 235e1db1_02a4_912f_7d82_ea6636c850c0["beginWork()"] 235e1db1_02a4_912f_7d82_ea6636c850c0 -->|calls| df2c7818_4611_b8d2_dfe8_a79e5972020c 709caba0_6dab_3197_d227_28b3fa3a6dc4["pushHostRootContext()"] df2c7818_4611_b8d2_dfe8_a79e5972020c -->|calls| 709caba0_6dab_3197_d227_28b3fa3a6dc4 697e1943_fa13_4adb_b6f2_f2eba2051634["pushRootMarkerInstance()"] df2c7818_4611_b8d2_dfe8_a79e5972020c -->|calls| 697e1943_fa13_4adb_b6f2_f2eba2051634 554cee68_4cbf_1f39_7875_14cfa10442ae["pushCacheProvider()"] df2c7818_4611_b8d2_dfe8_a79e5972020c -->|calls| 554cee68_4cbf_1f39_7875_14cfa10442ae 87c1044e_4880_6c4c_bb78_f18f233bb260["resetHydrationState()"] df2c7818_4611_b8d2_dfe8_a79e5972020c -->|calls| 87c1044e_4880_6c4c_bb78_f18f233bb260 a05eb624_1205_fe14_d003_611163eae529["pushHostContext()"] df2c7818_4611_b8d2_dfe8_a79e5972020c -->|calls| a05eb624_1205_fe14_d003_611163eae529 e104a7c6_8b49_d343_834d_bfd8cdc38b6d["pushHostContainer()"] df2c7818_4611_b8d2_dfe8_a79e5972020c -->|calls| e104a7c6_8b49_d343_834d_bfd8cdc38b6d c4dcccd0_c675_5cd8_8dbb_749fd21c187a["pushDehydratedActivitySuspenseHandler()"] df2c7818_4611_b8d2_dfe8_a79e5972020c -->|calls| c4dcccd0_c675_5cd8_8dbb_749fd21c187a style df2c7818_4611_b8d2_dfe8_a79e5972020c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-reconciler/src/ReactFiberBeginWork.js lines 3893–3973
function attemptEarlyBailoutIfNoScheduledUpdate(
current: Fiber,
workInProgress: Fiber,
renderLanes: Lanes,
) {
// This fiber does not have any pending work. Bailout without entering
// the begin phase. There's still some bookkeeping we that needs to be done
// in this optimized path, mostly pushing stuff onto the stack.
switch (workInProgress.tag) {
case HostRoot: {
pushHostRootContext(workInProgress);
const root: FiberRoot = workInProgress.stateNode;
pushRootTransition(workInProgress, root, renderLanes);
if (enableTransitionTracing) {
pushRootMarkerInstance(workInProgress);
}
const cache: Cache = current.memoizedState.cache;
pushCacheProvider(workInProgress, cache);
resetHydrationState();
break;
}
case HostSingleton:
case HostComponent:
pushHostContext(workInProgress);
break;
case ClassComponent: {
const Component = workInProgress.type;
if (isLegacyContextProvider(Component)) {
pushLegacyContextProvider(workInProgress);
}
break;
}
case HostPortal:
pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
break;
case ContextProvider: {
const newValue = workInProgress.memoizedProps.value;
const context: ReactContext<any> = workInProgress.type;
pushProvider(workInProgress, context, newValue);
break;
}
case Profiler:
if (enableProfilerTimer) {
// Profiler should only call onRender when one of its descendants actually rendered.
const hasChildWork = includesSomeLane(
renderLanes,
workInProgress.childLanes,
);
if (hasChildWork) {
workInProgress.flags |= Update;
}
if (enableProfilerCommitHooks) {
// Schedule a passive effect for this Profiler to call onPostCommit hooks.
// This effect should be scheduled even if there is no onPostCommit callback for this Profiler,
// because the effect is also where times bubble to parent Profilers.
workInProgress.flags |= Passive;
// Reset effect durations for the next eventual effect phase.
// These are reset during render to allow the DevTools commit hook a chance to read them,
const stateNode = workInProgress.stateNode;
stateNode.effectDuration = -0;
stateNode.passiveEffectDuration = -0;
}
}
break;
case ActivityComponent: {
const state: ActivityState | null = workInProgress.memoizedState;
if (state !== null) {
// We're dehydrated so we're not going to render the children. This is just
// to maintain push/pop symmetry.
// We know that this component will suspend again because if it has
// been unsuspended it has committed as a hydrated Activity component.
// If it needs to be retried, it should have work scheduled on it.
workInProgress.flags |= DidCapture;
pushDehydratedActivitySuspenseHandler(workInProgress);
return null;
}
break;
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does attemptEarlyBailoutIfNoScheduledUpdate() do?
attemptEarlyBailoutIfNoScheduledUpdate() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberBeginWork.js.
Where is attemptEarlyBailoutIfNoScheduledUpdate() defined?
attemptEarlyBailoutIfNoScheduledUpdate() is defined in packages/react-reconciler/src/ReactFiberBeginWork.js at line 3893.
What does attemptEarlyBailoutIfNoScheduledUpdate() call?
attemptEarlyBailoutIfNoScheduledUpdate() calls 7 function(s): pushCacheProvider, pushDehydratedActivitySuspenseHandler, pushHostContainer, pushHostContext, pushHostRootContext, pushRootMarkerInstance, resetHydrationState.
What calls attemptEarlyBailoutIfNoScheduledUpdate()?
attemptEarlyBailoutIfNoScheduledUpdate() is called by 1 function(s): beginWork.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free