scope() — react Function Reference
Architecture documentation for the scope() function in PropagateScopeDependenciesHIR.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 3a794155_ff06_85f0_8e9a_496a5d3f6133["scope()"] 1be3b542_2ecf_364c_adef_6e5675b7385e["DependencyCollectionContext"] 3a794155_ff06_85f0_8e9a_496a5d3f6133 -->|defined in| 1be3b542_2ecf_364c_adef_6e5675b7385e e4202808_c854_fd63_c981_990ad95d6125["isScopeActive()"] 3a794155_ff06_85f0_8e9a_496a5d3f6133 -->|calls| e4202808_c854_fd63_c981_990ad95d6125 3d5b98eb_196e_b05c_5771_3d21805eef0c["find()"] 3a794155_ff06_85f0_8e9a_496a5d3f6133 -->|calls| 3d5b98eb_196e_b05c_5771_3d21805eef0c style 3a794155_ff06_85f0_8e9a_496a5d3f6133 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/HIR/PropagateScopeDependenciesHIR.ts lines 519–524
#isScopeActive(scope: ReactiveScope): boolean {
if (this.#scopes === null) {
return false;
}
return this.#scopes.find(state => state === scope);
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does scope() do?
scope() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/PropagateScopeDependenciesHIR.ts.
Where is scope() defined?
scope() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/PropagateScopeDependenciesHIR.ts at line 519.
What does scope() call?
scope() calls 2 function(s): find, isScopeActive.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free