Home / Function/ recursivelyRestoreViewTransitions() — react Function Reference

recursivelyRestoreViewTransitions() — react Function Reference

Architecture documentation for the recursivelyRestoreViewTransitions() function in ReactFiberApplyGesture.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  00ef35cd_e1f7_60eb_6cfc_26776c2a9fec["recursivelyRestoreViewTransitions()"]
  ee850b36_fc0b_9bb2_5b69_58d705aef9a5["ReactFiberApplyGesture.js"]
  00ef35cd_e1f7_60eb_6cfc_26776c2a9fec -->|defined in| ee850b36_fc0b_9bb2_5b69_58d705aef9a5
  4c9257f7_64ef_4251_034e_92da1c758743["restoreViewTransitionsOnFiber()"]
  4c9257f7_64ef_4251_034e_92da1c758743 -->|calls| 00ef35cd_e1f7_60eb_6cfc_26776c2a9fec
  4c9257f7_64ef_4251_034e_92da1c758743["restoreViewTransitionsOnFiber()"]
  00ef35cd_e1f7_60eb_6cfc_26776c2a9fec -->|calls| 4c9257f7_64ef_4251_034e_92da1c758743
  style 00ef35cd_e1f7_60eb_6cfc_26776c2a9fec fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-reconciler/src/ReactFiberApplyGesture.js lines 1261–1286

function recursivelyRestoreViewTransitions(parentFiber: Fiber) {
  const deletions = parentFiber.deletions;
  if (deletions !== null) {
    for (let i = 0; i < deletions.length; i++) {
      const childToDelete = deletions[i];
      restoreEnterOrExitViewTransitions(childToDelete);
    }
  }

  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) {
      restoreViewTransitionsOnFiber(child);
      child = child.sibling;
    }
  } else {
    // Nothing has changed in this subtree, but the parent may have still affected
    // its size and position. We need to measure the old and new state to see if
    // we should animate its size and position.
    restoreNestedViewTransitions(parentFiber);
  }
}

Domain

Subdomains

Frequently Asked Questions

What does recursivelyRestoreViewTransitions() do?
recursivelyRestoreViewTransitions() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberApplyGesture.js.
Where is recursivelyRestoreViewTransitions() defined?
recursivelyRestoreViewTransitions() is defined in packages/react-reconciler/src/ReactFiberApplyGesture.js at line 1261.
What does recursivelyRestoreViewTransitions() call?
recursivelyRestoreViewTransitions() calls 1 function(s): restoreViewTransitionsOnFiber.
What calls recursivelyRestoreViewTransitions()?
recursivelyRestoreViewTransitions() is called by 1 function(s): restoreViewTransitionsOnFiber.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free