Home / Function/ currentScope() — react Function Reference

currentScope() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  10b5b17a_f3c2_cc80_4b16_d9daf5061245["currentScope()"]
  5ffcc39a_a87d_d30c_d2cd_be7a39db81a1["ScopeBlockTraversal"]
  10b5b17a_f3c2_cc80_4b16_d9daf5061245 -->|defined in| 5ffcc39a_a87d_d30c_d2cd_be7a39db81a1
  2f0c247d_1518_0cc0_2e7e_dbaee77d4552["currentScope()"]
  2f0c247d_1518_0cc0_2e7e_dbaee77d4552 -->|calls| 10b5b17a_f3c2_cc80_4b16_d9daf5061245
  style 10b5b17a_f3c2_cc80_4b16_d9daf5061245 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/HIR/visitors.ts lines 1307–1309

  get currentScope(): ScopeId | null {
    return this.#activeScopes.at(-1) ?? null;
  }

Subdomains

Called By

Frequently Asked Questions

What does currentScope() do?
currentScope() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/visitors.ts.
Where is currentScope() defined?
currentScope() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/visitors.ts at line 1307.
What calls currentScope()?
currentScope() is called by 1 function(s): currentScope.

Analyze Your Own Codebase

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

Try Supermodel Free