Home / Function/ print() — react Function Reference

print() — react Function Reference

Architecture documentation for the print() function in treeContextStateSerializer.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  c8111f05_8897_b9f0_3b50_d179587b68a1["print()"]
  6368f317_a2ff_596b_8cb4_4dbf63d3f81e["treeContextStateSerializer.js"]
  c8111f05_8897_b9f0_3b50_d179587b68a1 -->|defined in| 6368f317_a2ff_596b_8cb4_4dbf63d3f81e
  style c8111f05_8897_b9f0_3b50_d179587b68a1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-shared/src/__tests__/__serializers__/treeContextStateSerializer.js lines 19–25

export function print(state, serialize, indent) {
  // This is a big of a hack but it works around having to pass in a meta object e.g. {store, state}.
  // DevTools tests depend on a global Store object anyway (initialized via setupTest).
  const store = global.store;

  return printStore(store, false, state);
}

Domain

Subdomains

Frequently Asked Questions

What does print() do?
print() is a function in the react codebase, defined in packages/react-devtools-shared/src/__tests__/__serializers__/treeContextStateSerializer.js.
Where is print() defined?
print() is defined in packages/react-devtools-shared/src/__tests__/__serializers__/treeContextStateSerializer.js at line 19.

Analyze Your Own Codebase

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

Try Supermodel Free