Home / Function/ mountDehydratedSuspenseComponent() — react Function Reference

mountDehydratedSuspenseComponent() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  01383193_5efe_365a_bb32_2b8e5399ac5f["mountDehydratedSuspenseComponent()"]
  0be70812_cc0c_b210_f84f_8e61dd5f831c["ReactFiberBeginWork.js"]
  01383193_5efe_365a_bb32_2b8e5399ac5f -->|defined in| 0be70812_cc0c_b210_f84f_8e61dd5f831c
  f4acdab6_f680_af63_8940_0259a68c2f48["updateSuspenseComponent()"]
  f4acdab6_f680_af63_8940_0259a68c2f48 -->|calls| 01383193_5efe_365a_bb32_2b8e5399ac5f
  style 01383193_5efe_365a_bb32_2b8e5399ac5f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-reconciler/src/ReactFiberBeginWork.js lines 2911–2932

function mountDehydratedSuspenseComponent(
  workInProgress: Fiber,
  suspenseInstance: SuspenseInstance,
  renderLanes: Lanes,
): null | Fiber {
  // During the first pass, we'll bail out and not drill into the children.
  // Instead, we'll leave the content in place and try to hydrate it later.
  if (isSuspenseInstanceFallback(suspenseInstance)) {
    // This is a client-only boundary. Since we won't get any content from the server
    // for this, we need to schedule that at a higher priority based on when it would
    // have timed out. In theory we could render it in this pass but it would have the
    // wrong priority associated with it and will prevent hydration of parent path.
    // Instead, we'll leave work left on it to render it in a separate commit.
    // Schedule a normal pri update to render this content.
    workInProgress.lanes = laneToLanes(DefaultLane);
  } else {
    // We'll continue hydrating the rest at offscreen priority since we'll already
    // be showing the right content coming from the server, it is no rush.
    workInProgress.lanes = laneToLanes(OffscreenLane);
  }
  return null;
}

Domain

Subdomains

Frequently Asked Questions

What does mountDehydratedSuspenseComponent() do?
mountDehydratedSuspenseComponent() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberBeginWork.js.
Where is mountDehydratedSuspenseComponent() defined?
mountDehydratedSuspenseComponent() is defined in packages/react-reconciler/src/ReactFiberBeginWork.js at line 2911.
What calls mountDehydratedSuspenseComponent()?
mountDehydratedSuspenseComponent() is called by 1 function(s): updateSuspenseComponent.

Analyze Your Own Codebase

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

Try Supermodel Free