Home / Function/ traverseInstruction() — react Function Reference

traverseInstruction() — react Function Reference

Architecture documentation for the traverseInstruction() function in visitors.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  31c2e15e_64cc_996c_4233_ced53a2d09ed["traverseInstruction()"]
  af3ace55_db6d_865e_92b9_81486f6af1e7["ReactiveFunctionTransform"]
  31c2e15e_64cc_996c_4233_ced53a2d09ed -->|defined in| af3ace55_db6d_865e_92b9_81486f6af1e7
  940018a6_e890_d3b5_6044_cb8053953421["traverseInstruction()"]
  940018a6_e890_d3b5_6044_cb8053953421 -->|calls| 31c2e15e_64cc_996c_4233_ced53a2d09ed
  39ff6a63_fc67_04cf_7655_c9066bab21b8["visitID()"]
  31c2e15e_64cc_996c_4233_ced53a2d09ed -->|calls| 39ff6a63_fc67_04cf_7655_c9066bab21b8
  4c94103a_a617_5904_2070_e3b436762ea5["visitLValue()"]
  31c2e15e_64cc_996c_4233_ced53a2d09ed -->|calls| 4c94103a_a617_5904_2070_e3b436762ea5
  41f8ce8e_b5b8_2fcb_46ab_0111bb06c2f2["transformValue()"]
  31c2e15e_64cc_996c_4233_ced53a2d09ed -->|calls| 41f8ce8e_b5b8_2fcb_46ab_0111bb06c2f2
  940018a6_e890_d3b5_6044_cb8053953421["traverseInstruction()"]
  31c2e15e_64cc_996c_4233_ced53a2d09ed -->|calls| 940018a6_e890_d3b5_6044_cb8053953421
  10043bf1_f7ee_9ed9_307a_fe3edfd02b09["eachInstructionLValue()"]
  31c2e15e_64cc_996c_4233_ced53a2d09ed -->|calls| 10043bf1_f7ee_9ed9_307a_fe3edfd02b09
  style 31c2e15e_64cc_996c_4233_ced53a2d09ed fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/visitors.ts lines 436–452

  override traverseInstruction(
    instruction: ReactiveInstruction,
    state: TState,
  ): void {
    this.visitID(instruction.id, state);
    for (const operand of eachInstructionLValue(instruction)) {
      this.visitLValue(instruction.id, operand, state);
    }
    const nextValue = this.transformValue(
      instruction.id,
      instruction.value,
      state,
    );
    if (nextValue.kind === 'replace') {
      instruction.value = nextValue.value;
    }
  }

Domain

Subdomains

Frequently Asked Questions

What does traverseInstruction() do?
traverseInstruction() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/visitors.ts.
Where is traverseInstruction() defined?
traverseInstruction() is defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/visitors.ts at line 436.
What does traverseInstruction() call?
traverseInstruction() calls 5 function(s): eachInstructionLValue, transformValue, traverseInstruction, visitID, visitLValue.
What calls traverseInstruction()?
traverseInstruction() is called by 1 function(s): traverseInstruction.

Analyze Your Own Codebase

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

Try Supermodel Free