Home / Function/ getPlaceScope() — react Function Reference

getPlaceScope() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  7107ba22_4065_0956_1ec3_286f637d0d22["getPlaceScope()"]
  18a78965_f593_105b_e5e8_07001321c2ec["HIR.ts"]
  7107ba22_4065_0956_1ec3_286f637d0d22 -->|defined in| 18a78965_f593_105b_e5e8_07001321c2ec
  a5b9529f_84bd_279c_4f87_657080b7385f["visitPlace()"]
  a5b9529f_84bd_279c_4f87_657080b7385f -->|calls| 7107ba22_4065_0956_1ec3_286f637d0d22
  8469c07f_bb75_970a_4a16_a21afba094e1["alignReactiveScopesToBlockScopesHIR()"]
  8469c07f_bb75_970a_4a16_a21afba094e1 -->|calls| 7107ba22_4065_0956_1ec3_286f637d0d22
  0338496c_85f2_4fe4_8d22_e220ac6900fc["visitPlace()"]
  0338496c_85f2_4fe4_8d22_e220ac6900fc -->|calls| 7107ba22_4065_0956_1ec3_286f637d0d22
  5efb04f8_fe7e_23f5_ada1_07f7e110af62["visitOperand()"]
  5efb04f8_fe7e_23f5_ada1_07f7e110af62 -->|calls| 7107ba22_4065_0956_1ec3_286f637d0d22
  e4202808_c854_fd63_c981_990ad95d6125["isScopeActive()"]
  7107ba22_4065_0956_1ec3_286f637d0d22 -->|calls| e4202808_c854_fd63_c981_990ad95d6125
  style 7107ba22_4065_0956_1ec3_286f637d0d22 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts lines 1693–1702

export function getPlaceScope(
  id: InstructionId,
  place: Place,
): ReactiveScope | null {
  const scope = place.identifier.scope;
  if (scope !== null && isScopeActive(scope, id)) {
    return scope;
  }
  return null;
}

Subdomains

Frequently Asked Questions

What does getPlaceScope() do?
getPlaceScope() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts.
Where is getPlaceScope() defined?
getPlaceScope() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts at line 1693.
What does getPlaceScope() call?
getPlaceScope() calls 1 function(s): isScopeActive.
What calls getPlaceScope()?
getPlaceScope() is called by 4 function(s): alignReactiveScopesToBlockScopesHIR, visitOperand, visitPlace, visitPlace.

Analyze Your Own Codebase

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

Try Supermodel Free