recursivelyRestoreNew() — react Function Reference
Architecture documentation for the recursivelyRestoreNew() function in ReactFiberApplyGesture.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 6a791585_7057_bf37_7f59_c785a4d2ca32["recursivelyRestoreNew()"] ee850b36_fc0b_9bb2_5b69_58d705aef9a5["ReactFiberApplyGesture.js"] 6a791585_7057_bf37_7f59_c785a4d2ca32 -->|defined in| ee850b36_fc0b_9bb2_5b69_58d705aef9a5 5309a33c_225d_2870_d95a_89bdc6c62aa1["recursivelyApplyViewTransitions()"] 5309a33c_225d_2870_d95a_89bdc6c62aa1 -->|calls| 6a791585_7057_bf37_7f59_c785a4d2ca32 4d34856e_a065_6664_49e6_5e2f80a19d3a["applyViewTransitionsOnFiber()"] 4d34856e_a065_6664_49e6_5e2f80a19d3a -->|calls| 6a791585_7057_bf37_7f59_c785a4d2ca32 31dbea93_6a15_5a88_2a94_0513d6287f5a["commitHookEffectListUnmount()"] 6a791585_7057_bf37_7f59_c785a4d2ca32 -->|calls| 31dbea93_6a15_5a88_2a94_0513d6287f5a style 6a791585_7057_bf37_7f59_c785a4d2ca32 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-reconciler/src/ReactFiberApplyGesture.js lines 1065–1097
function recursivelyRestoreNew(
finishedWork: Fiber,
nearestMountedAncestor: Fiber,
): void {
// There has to be move a Placement AND an Update flag somewhere below for this
// pass to be relevant since we only apply insertion effects for new components here.
if (((Placement | Update) & finishedWork.subtreeFlags) !== NoFlags) {
let child = finishedWork.child;
while (child !== null) {
recursivelyRestoreNew(child, nearestMountedAncestor);
child = child.sibling;
}
}
switch (finishedWork.tag) {
case FunctionComponent:
case ForwardRef:
case MemoComponent:
case SimpleMemoComponent: {
const current = finishedWork.alternate;
if (current === null && finishedWork.flags & Update) {
// Insertion Effects are mounted temporarily during the rendering of the snapshot.
// We have now already takes a snapshot of the inserted state so we can now unmount
// them to get back into the original state before starting the animation.
commitHookEffectListUnmount(
HookInsertion | HookHasEffect,
finishedWork,
nearestMountedAncestor,
);
}
break;
}
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does recursivelyRestoreNew() do?
recursivelyRestoreNew() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberApplyGesture.js.
Where is recursivelyRestoreNew() defined?
recursivelyRestoreNew() is defined in packages/react-reconciler/src/ReactFiberApplyGesture.js at line 1065.
What does recursivelyRestoreNew() call?
recursivelyRestoreNew() calls 1 function(s): commitHookEffectListUnmount.
What calls recursivelyRestoreNew()?
recursivelyRestoreNew() is called by 2 function(s): applyViewTransitionsOnFiber, recursivelyApplyViewTransitions.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free