Home / Function/ visitValue() — react Function Reference

visitValue() — react Function Reference

Architecture documentation for the visitValue() function in PromoteUsedTemporaries.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  78355d65_1f32_95b3_2edb_a490a00bd7ef["visitValue()"]
  6f12ca85_3acd_66b9_2d6f_c30299633549["CollectPromotableTemporaries"]
  78355d65_1f32_95b3_2edb_a490a00bd7ef -->|defined in| 6f12ca85_3acd_66b9_2d6f_c30299633549
  c14f5738_eaa4_d5c4_4e3e_95793efd2968["visitValue()"]
  c14f5738_eaa4_d5c4_4e3e_95793efd2968 -->|calls| 78355d65_1f32_95b3_2edb_a490a00bd7ef
  c14f5738_eaa4_d5c4_4e3e_95793efd2968["visitValue()"]
  78355d65_1f32_95b3_2edb_a490a00bd7ef -->|calls| c14f5738_eaa4_d5c4_4e3e_95793efd2968
  08877452_9ff9_8d3b_95d4_e9e68e7f59e2["traverseValue()"]
  78355d65_1f32_95b3_2edb_a490a00bd7ef -->|calls| 08877452_9ff9_8d3b_95d4_e9e68e7f59e2
  style 78355d65_1f32_95b3_2edb_a490a00bd7ef fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PromoteUsedTemporaries.ts lines 201–210

  override visitValue(
    id: InstructionId,
    value: ReactiveValue,
    state: State,
  ): void {
    this.traverseValue(id, value, state);
    if (value.kind === 'JsxExpression' && value.tag.kind === 'Identifier') {
      state.tags.add(value.tag.identifier.declarationId);
    }
  }

Subdomains

Called By

Frequently Asked Questions

What does visitValue() do?
visitValue() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PromoteUsedTemporaries.ts.
Where is visitValue() defined?
visitValue() is defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PromoteUsedTemporaries.ts at line 201.
What does visitValue() call?
visitValue() calls 2 function(s): traverseValue, visitValue.
What calls visitValue()?
visitValue() is called by 1 function(s): visitValue.

Analyze Your Own Codebase

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

Try Supermodel Free