Home / Function/ visitValue() — react Function Reference

visitValue() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  59466e3c_8dff_c1c6_a9da_43f2174f7c1b["visitValue()"]
  b770ac0c_31b2_e0e1_e263_5ad9b2e589a6["Visitor"]
  59466e3c_8dff_c1c6_a9da_43f2174f7c1b -->|defined in| b770ac0c_31b2_e0e1_e263_5ad9b2e589a6
  589b952c_54d9_e44c_b76d_f45a1cf48ba7["visitHirFunction()"]
  59466e3c_8dff_c1c6_a9da_43f2174f7c1b -->|calls| 589b952c_54d9_e44c_b76d_f45a1cf48ba7
  efd512bc_cd12_5af4_cd24_a098be1037ec["visitValue()"]
  59466e3c_8dff_c1c6_a9da_43f2174f7c1b -->|calls| efd512bc_cd12_5af4_cd24_a098be1037ec
  4b2dfca2_90c1_e230_94e6_f6d4248bdb52["traverseValue()"]
  59466e3c_8dff_c1c6_a9da_43f2174f7c1b -->|calls| 4b2dfca2_90c1_e230_94e6_f6d4248bdb52
  style 59466e3c_8dff_c1c6_a9da_43f2174f7c1b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/CollectReferencedGlobals.ts lines 22–33

  override visitValue(
    id: InstructionId,
    value: ReactiveValue,
    state: Set<string>,
  ): void {
    this.traverseValue(id, value, state);
    if (value.kind === 'FunctionExpression' || value.kind === 'ObjectMethod') {
      this.visitHirFunction(value.loweredFunc.func, state);
    } else if (value.kind === 'LoadGlobal') {
      state.add(value.binding.name);
    }
  }

Domain

Subdomains

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/CollectReferencedGlobals.ts.
Where is visitValue() defined?
visitValue() is defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/CollectReferencedGlobals.ts at line 22.
What does visitValue() call?
visitValue() calls 3 function(s): traverseValue, visitHirFunction, visitValue.

Analyze Your Own Codebase

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

Try Supermodel Free