pushRootMarkerInstance() — react Function Reference
Architecture documentation for the pushRootMarkerInstance() function in ReactFiberTracingMarkerComponent.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 697e1943_fa13_4adb_b6f2_f2eba2051634["pushRootMarkerInstance()"] 05714c8c_b2f5_ddac_3f79_222b33006713["ReactFiberTracingMarkerComponent.js"] 697e1943_fa13_4adb_b6f2_f2eba2051634 -->|defined in| 05714c8c_b2f5_ddac_3f79_222b33006713 53f55fda_e2b6_2801_4fbc_525f8828d23d["updateHostRoot()"] 53f55fda_e2b6_2801_4fbc_525f8828d23d -->|calls| 697e1943_fa13_4adb_b6f2_f2eba2051634 df2c7818_4611_b8d2_dfe8_a79e5972020c["attemptEarlyBailoutIfNoScheduledUpdate()"] df2c7818_4611_b8d2_dfe8_a79e5972020c -->|calls| 697e1943_fa13_4adb_b6f2_f2eba2051634 style 697e1943_fa13_4adb_b6f2_f2eba2051634 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-reconciler/src/ReactFiberTracingMarkerComponent.js lines 203–240
export function pushRootMarkerInstance(workInProgress: Fiber): void {
if (enableTransitionTracing) {
// On the root, every transition gets mapped to it's own map of
// suspense boundaries. The transition is marked as complete when
// the suspense boundaries map is empty. We do this because every
// transition completes at different times and depends on different
// suspense boundaries to complete. We store all the transitions
// along with its map of suspense boundaries in the root incomplete
// transitions map. Each entry in this map functions like a tracing
// marker does, so we can push it onto the marker instance stack
const transitions = getWorkInProgressTransitions();
const root: FiberRoot = workInProgress.stateNode;
if (transitions !== null) {
transitions.forEach(transition => {
if (!root.incompleteTransitions.has(transition)) {
const markerInstance: TracingMarkerInstance = {
tag: TransitionRoot,
transitions: new Set([transition]),
pendingBoundaries: null,
aborts: null,
name: null,
};
root.incompleteTransitions.set(transition, markerInstance);
}
});
}
const markerInstances = [];
// For ever transition on the suspense boundary, we push the transition
// along with its map of pending suspense boundaries onto the marker
// instance stack.
root.incompleteTransitions.forEach(markerInstance => {
markerInstances.push(markerInstance);
});
push(markerInstanceStack, markerInstances, workInProgress);
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does pushRootMarkerInstance() do?
pushRootMarkerInstance() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberTracingMarkerComponent.js.
Where is pushRootMarkerInstance() defined?
pushRootMarkerInstance() is defined in packages/react-reconciler/src/ReactFiberTracingMarkerComponent.js at line 203.
What calls pushRootMarkerInstance()?
pushRootMarkerInstance() is called by 2 function(s): attemptEarlyBailoutIfNoScheduledUpdate, updateHostRoot.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free