abortTracingMarkerTransitions() — react Function Reference
Architecture documentation for the abortTracingMarkerTransitions() function in ReactFiberCommitWork.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 64e90a18_58ae_5e60_031d_417980cd0e34["abortTracingMarkerTransitions()"] e0fbfbd5_47b0_a489_0b36_bbfad9245544["ReactFiberCommitWork.js"] 64e90a18_58ae_5e60_031d_417980cd0e34 -->|defined in| e0fbfbd5_47b0_a489_0b36_bbfad9245544 9122110e_e4df_7275_b4ee_a3a5f62365dc["abortParentMarkerTransitionsForDeletedFiber()"] 9122110e_e4df_7275_b4ee_a3a5f62365dc -->|calls| 64e90a18_58ae_5e60_031d_417980cd0e34 style 64e90a18_58ae_5e60_031d_417980cd0e34 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-reconciler/src/ReactFiberCommitWork.js lines 953–1010
function abortTracingMarkerTransitions(
abortedFiber: Fiber,
abort: TransitionAbort,
deletedTransitions: Set<Transition>,
deletedOffscreenInstance: OffscreenInstance | null,
isInDeletedTree: boolean,
) {
if (enableTransitionTracing) {
const markerInstance: TracingMarkerInstance = abortedFiber.stateNode;
const markerTransitions = markerInstance.transitions;
const pendingBoundaries = markerInstance.pendingBoundaries;
if (markerTransitions !== null) {
// TODO: Refactor this code. Is there a way to move this code to
// the deletions phase instead of calculating it here while making sure
// complete is called appropriately?
deletedTransitions.forEach(transition => {
// If one of the transitions on the tracing marker is a transition
// that was in an aborted subtree, we will abort that tracing marker
if (
abortedFiber !== null &&
markerTransitions.has(transition) &&
(markerInstance.aborts === null ||
!markerInstance.aborts.includes(abort))
) {
if (markerInstance.transitions !== null) {
if (markerInstance.aborts === null) {
markerInstance.aborts = [abort];
addMarkerIncompleteCallbackToPendingTransition(
abortedFiber.memoizedProps.name,
markerInstance.transitions,
markerInstance.aborts,
);
} else {
markerInstance.aborts.push(abort);
}
// We only want to call onTransitionProgress when the marker hasn't been
// deleted
if (
deletedOffscreenInstance !== null &&
!isInDeletedTree &&
pendingBoundaries !== null &&
pendingBoundaries.has(deletedOffscreenInstance)
) {
pendingBoundaries.delete(deletedOffscreenInstance);
addMarkerProgressCallbackToPendingTransition(
abortedFiber.memoizedProps.name,
deletedTransitions,
pendingBoundaries,
);
}
}
}
});
}
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does abortTracingMarkerTransitions() do?
abortTracingMarkerTransitions() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberCommitWork.js.
Where is abortTracingMarkerTransitions() defined?
abortTracingMarkerTransitions() is defined in packages/react-reconciler/src/ReactFiberCommitWork.js at line 953.
What calls abortTracingMarkerTransitions()?
abortTracingMarkerTransitions() is called by 1 function(s): abortParentMarkerTransitionsForDeletedFiber.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free