recursivelyInsertClones() — react Function Reference
Architecture documentation for the recursivelyInsertClones() function in ReactFiberApplyGesture.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 5da5a209_accd_7ea4_eb0a_748553ba2647["recursivelyInsertClones()"] ee850b36_fc0b_9bb2_5b69_58d705aef9a5["ReactFiberApplyGesture.js"] 5da5a209_accd_7ea4_eb0a_748553ba2647 -->|defined in| ee850b36_fc0b_9bb2_5b69_58d705aef9a5 585297c1_5fbc_f778_b0fa_7f11968cec48["insertDestinationClonesOfFiber()"] 585297c1_5fbc_f778_b0fa_7f11968cec48 -->|calls| 5da5a209_accd_7ea4_eb0a_748553ba2647 1678510b_1bcd_dc77_c5cf_c593bd5a9201["insertDestinationClones()"] 1678510b_1bcd_dc77_c5cf_c593bd5a9201 -->|calls| 5da5a209_accd_7ea4_eb0a_748553ba2647 282c3969_f657_3d4a_7c17_9af393a5187a["trackEnterViewTransitions()"] 5da5a209_accd_7ea4_eb0a_748553ba2647 -->|calls| 282c3969_f657_3d4a_7c17_9af393a5187a c1429200_7c6a_e13e_08a2_fa616dd968a7["trackHostMutation()"] 5da5a209_accd_7ea4_eb0a_748553ba2647 -->|calls| c1429200_7c6a_e13e_08a2_fa616dd968a7 585297c1_5fbc_f778_b0fa_7f11968cec48["insertDestinationClonesOfFiber()"] 5da5a209_accd_7ea4_eb0a_748553ba2647 -->|calls| 585297c1_5fbc_f778_b0fa_7f11968cec48 d5ea8670_901e_392b_55a7_640c298b5971["recursivelyInsertClonesFromExistingTree()"] 5da5a209_accd_7ea4_eb0a_748553ba2647 -->|calls| d5ea8670_901e_392b_55a7_640c298b5971 style 5da5a209_accd_7ea4_eb0a_748553ba2647 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-reconciler/src/ReactFiberApplyGesture.js lines 741–784
function recursivelyInsertClones(
parentFiber: Fiber,
hostParentClone: Instance,
parentViewTransition: null | ViewTransitionState,
visitPhase: VisitPhase,
) {
const deletions = parentFiber.deletions;
if (deletions !== null) {
for (let i = 0; i < deletions.length; i++) {
const childToDelete = deletions[i];
trackEnterViewTransitions(childToDelete);
// Normally we would only mark something as triggering a mutation if there was
// actually a HostInstance below here. If this tree didn't contain a HostInstances
// we shouldn't trigger a mutation even though a virtual component was deleted.
trackHostMutation();
}
}
if (
parentFiber.alternate === null ||
(parentFiber.subtreeFlags & MutationMask) !== NoFlags
) {
// If we have mutations or if this is a newly inserted tree, clone as we go.
let child = parentFiber.child;
while (child !== null) {
insertDestinationClonesOfFiber(
child,
hostParentClone,
parentViewTransition,
visitPhase,
);
child = child.sibling;
}
} else {
// Once we reach a subtree with no more mutations we can bail out.
// However, we must still insert deep clones of the HostComponents.
recursivelyInsertClonesFromExistingTree(
parentFiber,
hostParentClone,
parentViewTransition,
visitPhase,
);
}
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does recursivelyInsertClones() do?
recursivelyInsertClones() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberApplyGesture.js.
Where is recursivelyInsertClones() defined?
recursivelyInsertClones() is defined in packages/react-reconciler/src/ReactFiberApplyGesture.js at line 741.
What does recursivelyInsertClones() call?
recursivelyInsertClones() calls 4 function(s): insertDestinationClonesOfFiber, recursivelyInsertClonesFromExistingTree, trackEnterViewTransitions, trackHostMutation.
What calls recursivelyInsertClones()?
recursivelyInsertClones() is called by 2 function(s): insertDestinationClones, insertDestinationClonesOfFiber.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free