Home / Function/ accumulateSuspenseyCommitOnFiber() — react Function Reference

accumulateSuspenseyCommitOnFiber() — react Function Reference

Architecture documentation for the accumulateSuspenseyCommitOnFiber() function in ReactFiberCommitWork.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  a5f41451_6930_8fd7_f693_e334a5738626["accumulateSuspenseyCommitOnFiber()"]
  e0fbfbd5_47b0_a489_0b36_bbfad9245544["ReactFiberCommitWork.js"]
  a5f41451_6930_8fd7_f693_e334a5738626 -->|defined in| e0fbfbd5_47b0_a489_0b36_bbfad9245544
  1a908a70_0d41_844b_9178_6174a8754a7b["accumulateSuspenseyCommit()"]
  1a908a70_0d41_844b_9178_6174a8754a7b -->|calls| a5f41451_6930_8fd7_f693_e334a5738626
  b339e075_5e30_b612_6f10_bf92b061f0aa["recursivelyAccumulateSuspenseyCommit()"]
  b339e075_5e30_b612_6f10_bf92b061f0aa -->|calls| a5f41451_6930_8fd7_f693_e334a5738626
  b339e075_5e30_b612_6f10_bf92b061f0aa["recursivelyAccumulateSuspenseyCommit()"]
  a5f41451_6930_8fd7_f693_e334a5738626 -->|calls| b339e075_5e30_b612_6f10_bf92b061f0aa
  6486cef6_6d5d_a3e2_7ea5_8712a1f0c186["trackAppearingViewTransition()"]
  a5f41451_6930_8fd7_f693_e334a5738626 -->|calls| 6486cef6_6d5d_a3e2_7ea5_8712a1f0c186
  style a5f41451_6930_8fd7_f693_e334a5738626 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-reconciler/src/ReactFiberCommitWork.js lines 4629–4769

function accumulateSuspenseyCommitOnFiber(
  fiber: Fiber,
  committedLanes: Lanes,
  suspendedState: SuspendedState,
) {
  switch (fiber.tag) {
    case HostHoistable: {
      recursivelyAccumulateSuspenseyCommit(
        fiber,
        committedLanes,
        suspendedState,
      );
      if (fiber.flags & suspenseyCommitFlag) {
        if (fiber.memoizedState !== null) {
          suspendResource(
            suspendedState,
            // This should always be set by visiting HostRoot first
            (currentHoistableRoot: any),
            fiber.memoizedState,
            fiber.memoizedProps,
          );
        } else {
          const instance = fiber.stateNode;
          const type = fiber.type;
          const props = fiber.memoizedProps;
          // TODO: Allow sync lanes to suspend too with an opt-in.
          if (
            includesOnlySuspenseyCommitEligibleLanes(committedLanes) ||
            maySuspendCommitInSyncRender(type, props)
          ) {
            suspendInstance(suspendedState, instance, type, props);
          }
        }
      }
      break;
    }
    case HostComponent: {
      recursivelyAccumulateSuspenseyCommit(
        fiber,
        committedLanes,
        suspendedState,
      );
      if (fiber.flags & suspenseyCommitFlag) {
        const instance = fiber.stateNode;
        const type = fiber.type;
        const props = fiber.memoizedProps;
        // TODO: Allow sync lanes to suspend too with an opt-in.
        if (
          includesOnlySuspenseyCommitEligibleLanes(committedLanes) ||
          maySuspendCommitInSyncRender(type, props)
        ) {
          suspendInstance(suspendedState, instance, type, props);
        }
      }
      break;
    }
    case HostRoot:
    case HostPortal: {
      if (supportsResources) {
        const previousHoistableRoot = currentHoistableRoot;
        const container: Container = fiber.stateNode.containerInfo;
        currentHoistableRoot = getHoistableRoot(container);

        recursivelyAccumulateSuspenseyCommit(
          fiber,
          committedLanes,
          suspendedState,
        );
        currentHoistableRoot = previousHoistableRoot;
      } else {
        recursivelyAccumulateSuspenseyCommit(
          fiber,
          committedLanes,
          suspendedState,
        );
      }
      break;
    }
    case OffscreenComponent: {
      const isHidden = (fiber.memoizedState: OffscreenState | null) !== null;
      if (isHidden) {

Domain

Subdomains

Frequently Asked Questions

What does accumulateSuspenseyCommitOnFiber() do?
accumulateSuspenseyCommitOnFiber() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberCommitWork.js.
Where is accumulateSuspenseyCommitOnFiber() defined?
accumulateSuspenseyCommitOnFiber() is defined in packages/react-reconciler/src/ReactFiberCommitWork.js at line 4629.
What does accumulateSuspenseyCommitOnFiber() call?
accumulateSuspenseyCommitOnFiber() calls 2 function(s): recursivelyAccumulateSuspenseyCommit, trackAppearingViewTransition.
What calls accumulateSuspenseyCommitOnFiber()?
accumulateSuspenseyCommitOnFiber() is called by 2 function(s): accumulateSuspenseyCommit, recursivelyAccumulateSuspenseyCommit.

Analyze Your Own Codebase

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

Try Supermodel Free