Home / Function/ resetSuspendedCurrentOnMountInLegacyMode() — react Function Reference

resetSuspendedCurrentOnMountInLegacyMode() — react Function Reference

Architecture documentation for the resetSuspendedCurrentOnMountInLegacyMode() function in ReactFiberBeginWork.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  365b3bf6_96da_115f_49cb_3cce0265b371["resetSuspendedCurrentOnMountInLegacyMode()"]
  0be70812_cc0c_b210_f84f_8e61dd5f831c["ReactFiberBeginWork.js"]
  365b3bf6_96da_115f_49cb_3cce0265b371 -->|defined in| 0be70812_cc0c_b210_f84f_8e61dd5f831c
  00a9caf0_34fa_f3b2_0df5_823e58b3a1e6["mountIncompleteFunctionComponent()"]
  00a9caf0_34fa_f3b2_0df5_823e58b3a1e6 -->|calls| 365b3bf6_96da_115f_49cb_3cce0265b371
  9bea19b8_e307_63f1_e3b4_89c20a3fd20b["updateClassComponent()"]
  9bea19b8_e307_63f1_e3b4_89c20a3fd20b -->|calls| 365b3bf6_96da_115f_49cb_3cce0265b371
  53f55fda_e2b6_2801_4fbc_525f8828d23d["updateHostRoot()"]
  53f55fda_e2b6_2801_4fbc_525f8828d23d -->|calls| 365b3bf6_96da_115f_49cb_3cce0265b371
  0516fb13_8886_d15c_4bfa_1bd5d35db45d["mountIncompleteClassComponent()"]
  0516fb13_8886_d15c_4bfa_1bd5d35db45d -->|calls| 365b3bf6_96da_115f_49cb_3cce0265b371
  style 365b3bf6_96da_115f_49cb_3cce0265b371 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-reconciler/src/ReactFiberBeginWork.js lines 3744–3760

function resetSuspendedCurrentOnMountInLegacyMode(
  current: null | Fiber,
  workInProgress: Fiber,
) {
  if (!disableLegacyMode && (workInProgress.mode & ConcurrentMode) === NoMode) {
    if (current !== null) {
      // A lazy component only mounts if it suspended inside a non-
      // concurrent tree, in an inconsistent state. We want to treat it like
      // a new mount, even though an empty version of it already committed.
      // Disconnect the alternate pointers.
      current.alternate = null;
      workInProgress.alternate = null;
      // Since this is conceptually a new fiber, schedule a Placement effect
      workInProgress.flags |= Placement;
    }
  }
}

Domain

Subdomains

Frequently Asked Questions

What does resetSuspendedCurrentOnMountInLegacyMode() do?
resetSuspendedCurrentOnMountInLegacyMode() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberBeginWork.js.
Where is resetSuspendedCurrentOnMountInLegacyMode() defined?
resetSuspendedCurrentOnMountInLegacyMode() is defined in packages/react-reconciler/src/ReactFiberBeginWork.js at line 3744.
What calls resetSuspendedCurrentOnMountInLegacyMode()?
resetSuspendedCurrentOnMountInLegacyMode() is called by 4 function(s): mountIncompleteClassComponent, mountIncompleteFunctionComponent, updateClassComponent, updateHostRoot.

Analyze Your Own Codebase

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

Try Supermodel Free