Home / Function/ visitScope() — react Function Reference

visitScope() — react Function Reference

Architecture documentation for the visitScope() function in ExtractScopeDeclarationsFromDestructuring.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  efc55709_424e_1e0c_5f10_7e9c80368cf4["visitScope()"]
  b58ba090_1fb5_5776_b61b_d8510ef16394["Visitor"]
  efc55709_424e_1e0c_5f10_7e9c80368cf4 -->|defined in| b58ba090_1fb5_5776_b61b_d8510ef16394
  2eebfc2b_b1f6_9f25_ad32_78be0b56f06b["traverseScope()"]
  efc55709_424e_1e0c_5f10_7e9c80368cf4 -->|calls| 2eebfc2b_b1f6_9f25_ad32_78be0b56f06b
  4acb57df_5348_9aab_9691_41cf35127db4["visitScope()"]
  efc55709_424e_1e0c_5f10_7e9c80368cf4 -->|calls| 4acb57df_5348_9aab_9691_41cf35127db4
  style efc55709_424e_1e0c_5f10_7e9c80368cf4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/ExtractScopeDeclarationsFromDestructuring.ts lines 107–112

  override visitScope(scope: ReactiveScopeBlock, state: State): void {
    for (const [, declaration] of scope.scope.declarations) {
      state.declared.add(declaration.identifier.declarationId);
    }
    this.traverseScope(scope, state);
  }

Domain

Subdomains

Frequently Asked Questions

What does visitScope() do?
visitScope() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/ExtractScopeDeclarationsFromDestructuring.ts.
Where is visitScope() defined?
visitScope() is defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/ExtractScopeDeclarationsFromDestructuring.ts at line 107.
What does visitScope() call?
visitScope() calls 2 function(s): traverseScope, visitScope.

Analyze Your Own Codebase

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

Try Supermodel Free