Home / Function/ printSuspenseWithChildren() — react Function Reference

printSuspenseWithChildren() — react Function Reference

Architecture documentation for the printSuspenseWithChildren() function in utils.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  ae59a0ab_8058_50ec_939d_2f5c2fbce4f2["printSuspenseWithChildren()"]
  fa31bba5_57ed_1039_52bb_4a8cb4382642["utils.js"]
  ae59a0ab_8058_50ec_939d_2f5c2fbce4f2 -->|defined in| fa31bba5_57ed_1039_52bb_4a8cb4382642
  d738af75_576c_a12f_4a3a_c9e3cfe329a7["printStore()"]
  d738af75_576c_a12f_4a3a_c9e3cfe329a7 -->|calls| ae59a0ab_8058_50ec_939d_2f5c2fbce4f2
  2403d611_a1c2_a09d_7552_501d48491b77["printSuspense()"]
  ae59a0ab_8058_50ec_939d_2f5c2fbce4f2 -->|calls| 2403d611_a1c2_a09d_7552_501d48491b77
  style ae59a0ab_8058_50ec_939d_2f5c2fbce4f2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-shared/src/devtools/utils.js lines 73–89

function printSuspenseWithChildren(
  store: Store,
  suspense: SuspenseNode,
  depth: number,
): Array<string> {
  const lines = ['  '.repeat(depth) + printSuspense(suspense)];
  for (let i = 0; i < suspense.children.length; i++) {
    const childID = suspense.children[i];
    const child = store.getSuspenseByID(childID);
    if (child === null) {
      throw new Error(`Could not find Suspense node with ID "${childID}".`);
    }
    lines.push(...printSuspenseWithChildren(store, child, depth + 1));
  }

  return lines;
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does printSuspenseWithChildren() do?
printSuspenseWithChildren() is a function in the react codebase, defined in packages/react-devtools-shared/src/devtools/utils.js.
Where is printSuspenseWithChildren() defined?
printSuspenseWithChildren() is defined in packages/react-devtools-shared/src/devtools/utils.js at line 73.
What does printSuspenseWithChildren() call?
printSuspenseWithChildren() calls 1 function(s): printSuspense.
What calls printSuspenseWithChildren()?
printSuspenseWithChildren() is called by 1 function(s): printStore.

Analyze Your Own Codebase

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

Try Supermodel Free