Home / Function/ makeScopeId() — react Function Reference

makeScopeId() — react Function Reference

Architecture documentation for the makeScopeId() function in HIR.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  e57ff31c_5eb7_cdd4_99df_c7f1cef378c3["makeScopeId()"]
  18a78965_f593_105b_e5e8_07001321c2ec["HIR.ts"]
  e57ff31c_5eb7_cdd4_99df_c7f1cef378c3 -->|defined in| 18a78965_f593_105b_e5e8_07001321c2ec
  681b220d_e67e_5b0e_c774_2b836e0c27bc["nextScopeId()"]
  681b220d_e67e_5b0e_c774_2b836e0c27bc -->|calls| e57ff31c_5eb7_cdd4_99df_c7f1cef378c3
  041ca752_10c1_3cda_1f5c_02f44a01310e["invariant()"]
  e57ff31c_5eb7_cdd4_99df_c7f1cef378c3 -->|calls| 041ca752_10c1_3cda_1f5c_02f44a01310e
  style e57ff31c_5eb7_cdd4_99df_c7f1cef378c3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts lines 1730–1736

export function makeScopeId(id: number): ScopeId {
  CompilerError.invariant(id >= 0 && Number.isInteger(id), {
    reason: 'Expected block id to be a non-negative integer',
    loc: GeneratedSource,
  });
  return id as ScopeId;
}

Subdomains

Calls

Called By

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free