applyExitViewTransition() — react Function Reference
Architecture documentation for the applyExitViewTransition() function in ReactFiberApplyGesture.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD e901b09e_6606_f374_768c_8c36e1bb4676["applyExitViewTransition()"] ee850b36_fc0b_9bb2_5b69_58d705aef9a5["ReactFiberApplyGesture.js"] e901b09e_6606_f374_768c_8c36e1bb4676 -->|defined in| ee850b36_fc0b_9bb2_5b69_58d705aef9a5 14488ed6_0070_cb72_08ff_37fc5c860d29["recursivelyInsertNewFiber()"] 14488ed6_0070_cb72_08ff_37fc5c860d29 -->|calls| e901b09e_6606_f374_768c_8c36e1bb4676 d5ea8670_901e_392b_55a7_640c298b5971["recursivelyInsertClonesFromExistingTree()"] d5ea8670_901e_392b_55a7_640c298b5971 -->|calls| e901b09e_6606_f374_768c_8c36e1bb4676 585297c1_5fbc_f778_b0fa_7f11968cec48["insertDestinationClonesOfFiber()"] 585297c1_5fbc_f778_b0fa_7f11968cec48 -->|calls| e901b09e_6606_f374_768c_8c36e1bb4676 fb6ac8c2_1325_f769_79fa_77c9d16252f1["getViewTransitionName()"] e901b09e_6606_f374_768c_8c36e1bb4676 -->|calls| fb6ac8c2_1325_f769_79fa_77c9d16252f1 be70b440_45eb_ff76_0bc6_50898635623c["getViewTransitionClassName()"] e901b09e_6606_f374_768c_8c36e1bb4676 -->|calls| be70b440_45eb_ff76_0bc6_50898635623c 45145b45_9179_2a0e_5b39_0f8c3bceb8c9["applyViewTransitionToClones()"] e901b09e_6606_f374_768c_8c36e1bb4676 -->|calls| 45145b45_9179_2a0e_5b39_0f8c3bceb8c9 style e901b09e_6606_f374_768c_8c36e1bb4676 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-reconciler/src/ReactFiberApplyGesture.js lines 301–332
function applyExitViewTransition(placement: Fiber): void {
// Normally these helpers do recursive calls but since insertion/offscreen is forked
// we call this helper from those loops instead. This must be called only on
// ViewTransitionComponent that has already had their clones filled.
const state: ViewTransitionState = placement.stateNode;
const props: ViewTransitionProps = placement.memoizedProps;
const name = getViewTransitionName(props, state);
const className: ?string = getViewTransitionClassName(
props.default,
// Note that just because we don't have a pair yet doesn't mean we won't find one
// later. However, that doesn't matter because if we do the class name that wins
// is the one applied by the "new" side anyway.
state.paired ? props.share : props.exit,
);
if (className !== 'none') {
// TODO: Ideally we could determine if this exit is in the viewport and
// exclude it otherwise but that would require waiting until we insert
// and layout the clones first. Currently wait until the view transition
// starts before reading the layout.
const clones = state.clones;
// If there are no clones at this point, that should mean that there are no
// HostComponent children in this ViewTransition.
if (clones !== null) {
applyViewTransitionToClones(name, className, clones, placement);
}
if (state.paired) {
scheduleGestureTransitionEvent(placement, props.onGestureShare);
} else {
scheduleGestureTransitionEvent(placement, props.onGestureExit);
}
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does applyExitViewTransition() do?
applyExitViewTransition() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberApplyGesture.js.
Where is applyExitViewTransition() defined?
applyExitViewTransition() is defined in packages/react-reconciler/src/ReactFiberApplyGesture.js at line 301.
What does applyExitViewTransition() call?
applyExitViewTransition() calls 3 function(s): applyViewTransitionToClones, getViewTransitionClassName, getViewTransitionName.
What calls applyExitViewTransition()?
applyExitViewTransition() is called by 3 function(s): insertDestinationClonesOfFiber, recursivelyInsertClonesFromExistingTree, recursivelyInsertNewFiber.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free