Home / Function/ skipPastDehydratedSuspenseInstance() — react Function Reference

skipPastDehydratedSuspenseInstance() — react Function Reference

Architecture documentation for the skipPastDehydratedSuspenseInstance() function in ReactFiberHydrationContext.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  8b71ce74_d8c0_0acb_ce64_4739cedd13ea["skipPastDehydratedSuspenseInstance()"]
  4bc7109f_638d_d9f7_bf47_6ec55b2fa128["ReactFiberHydrationContext.js"]
  8b71ce74_d8c0_0acb_ce64_4739cedd13ea -->|defined in| 4bc7109f_638d_d9f7_bf47_6ec55b2fa128
  b741356a_b031_e7cd_ea5d_ed59f056748d["popHydrationState()"]
  b741356a_b031_e7cd_ea5d_ed59f056748d -->|calls| 8b71ce74_d8c0_0acb_ce64_4739cedd13ea
  style 8b71ce74_d8c0_0acb_ce64_4739cedd13ea fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-reconciler/src/ReactFiberHydrationContext.js lines 692–713

function skipPastDehydratedSuspenseInstance(
  fiber: Fiber,
): null | HydratableInstance {
  if (!supportsHydration) {
    throw new Error(
      'Expected skipPastDehydratedSuspenseInstance() to never be called. ' +
        'This error is likely caused by a bug in React. Please file an issue.',
    );
  }
  const suspenseState: null | SuspenseState = fiber.memoizedState;
  const suspenseInstance: null | SuspenseInstance =
    suspenseState !== null ? suspenseState.dehydrated : null;

  if (!suspenseInstance) {
    throw new Error(
      'Expected to have a hydrated suspense instance. ' +
        'This error is likely caused by a bug in React. Please file an issue.',
    );
  }

  return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);
}

Domain

Subdomains

Frequently Asked Questions

What does skipPastDehydratedSuspenseInstance() do?
skipPastDehydratedSuspenseInstance() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberHydrationContext.js.
Where is skipPastDehydratedSuspenseInstance() defined?
skipPastDehydratedSuspenseInstance() is defined in packages/react-reconciler/src/ReactFiberHydrationContext.js at line 692.
What calls skipPastDehydratedSuspenseInstance()?
skipPastDehydratedSuspenseInstance() is called by 1 function(s): popHydrationState.

Analyze Your Own Codebase

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

Try Supermodel Free