Home / Function/ printNode() — react Function Reference

printNode() — react Function Reference

Architecture documentation for the printNode() function in InstructionReordering.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  843b9a2f_f7fa_8b25_52a1_e24f3185eefc["printNode()"]
  dc3f5251_a95c_3c77_5550_3882c13a37c9["InstructionReordering.ts"]
  843b9a2f_f7fa_8b25_52a1_e24f3185eefc -->|defined in| dc3f5251_a95c_3c77_5550_3882c13a37c9
  7b9ee6ee_c43a_8594_2d2b_4347e2e623a4["print()"]
  7b9ee6ee_c43a_8594_2d2b_4347e2e623a4 -->|calls| 843b9a2f_f7fa_8b25_52a1_e24f3185eefc
  1bdf9e01_ffb0_1422_a451_e62965a1969b["printInstruction()"]
  843b9a2f_f7fa_8b25_52a1_e24f3185eefc -->|calls| 1bdf9e01_ffb0_1422_a451_e62965a1969b
  style 843b9a2f_f7fa_8b25_52a1_e24f3185eefc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/Optimization/InstructionReordering.ts lines 423–437

function printNode(node: Node): string {
  const {instruction} = node;
  if (instruction === null) {
    return '<lvalue-only>';
  }
  switch (instruction.value.kind) {
    case 'FunctionExpression':
    case 'ObjectMethod': {
      return `[${instruction.id}] ${instruction.value.kind}`;
    }
    default: {
      return printInstruction(instruction);
    }
  }
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does printNode() do?
printNode() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/Optimization/InstructionReordering.ts.
Where is printNode() defined?
printNode() is defined in compiler/packages/babel-plugin-react-compiler/src/Optimization/InstructionReordering.ts at line 423.
What does printNode() call?
printNode() calls 1 function(s): printInstruction.
What calls printNode()?
printNode() is called by 1 function(s): print.

Analyze Your Own Codebase

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

Try Supermodel Free