applyAppearingPairViewTransition() — react Function Reference
Architecture documentation for the applyAppearingPairViewTransition() function in ReactFiberApplyGesture.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 4d7237b6_d6aa_66af_1ea0_e984a1cd77c4["applyAppearingPairViewTransition()"] ee850b36_fc0b_9bb2_5b69_58d705aef9a5["ReactFiberApplyGesture.js"] 4d7237b6_d6aa_66af_1ea0_e984a1cd77c4 -->|defined in| ee850b36_fc0b_9bb2_5b69_58d705aef9a5 14488ed6_0070_cb72_08ff_37fc5c860d29["recursivelyInsertNewFiber()"] 14488ed6_0070_cb72_08ff_37fc5c860d29 -->|calls| 4d7237b6_d6aa_66af_1ea0_e984a1cd77c4 d5ea8670_901e_392b_55a7_640c298b5971["recursivelyInsertClonesFromExistingTree()"] d5ea8670_901e_392b_55a7_640c298b5971 -->|calls| 4d7237b6_d6aa_66af_1ea0_e984a1cd77c4 585297c1_5fbc_f778_b0fa_7f11968cec48["insertDestinationClonesOfFiber()"] 585297c1_5fbc_f778_b0fa_7f11968cec48 -->|calls| 4d7237b6_d6aa_66af_1ea0_e984a1cd77c4 be70b440_45eb_ff76_0bc6_50898635623c["getViewTransitionClassName()"] 4d7237b6_d6aa_66af_1ea0_e984a1cd77c4 -->|calls| be70b440_45eb_ff76_0bc6_50898635623c 45145b45_9179_2a0e_5b39_0f8c3bceb8c9["applyViewTransitionToClones()"] 4d7237b6_d6aa_66af_1ea0_e984a1cd77c4 -->|calls| 45145b45_9179_2a0e_5b39_0f8c3bceb8c9 style 4d7237b6_d6aa_66af_1ea0_e984a1cd77c4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-reconciler/src/ReactFiberApplyGesture.js lines 265–299
function applyAppearingPairViewTransition(child: 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.
if ((child.flags & ViewTransitionNamedStatic) !== NoFlags) {
const state: ViewTransitionState = child.stateNode;
// If this is not yet paired, it doesn't mean that we won't pair it later when
// we find the deletion side. If that's the case then we'll add the names to
// the clones then.
if (state.paired) {
const props: ViewTransitionProps = child.memoizedProps;
if (props.name == null || props.name === 'auto') {
throw new Error(
'Found a pair with an auto name. This is a bug in React.',
);
}
const name = props.name;
// Note that this class name that doesn't actually really matter because the
// "new" side will be the one that wins in practice.
const className: ?string = getViewTransitionClassName(
props.default,
props.share,
);
if (className !== 'none') {
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, child);
}
scheduleGestureTransitionEvent(child, props.onGestureShare);
}
}
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does applyAppearingPairViewTransition() do?
applyAppearingPairViewTransition() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberApplyGesture.js.
Where is applyAppearingPairViewTransition() defined?
applyAppearingPairViewTransition() is defined in packages/react-reconciler/src/ReactFiberApplyGesture.js at line 265.
What does applyAppearingPairViewTransition() call?
applyAppearingPairViewTransition() calls 2 function(s): applyViewTransitionToClones, getViewTransitionClassName.
What calls applyAppearingPairViewTransition()?
applyAppearingPairViewTransition() 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