visitPrunedScope() — react Function Reference
Architecture documentation for the visitPrunedScope() function in CollectReactiveIdentifiers.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD a9c6b7d9_4ec5_27f1_c527_5516a037bb60["visitPrunedScope()"] a0777e2d_7e90_b69c_255a_fe48677d448a["Visitor"] a9c6b7d9_4ec5_27f1_c527_5516a037bb60 -->|defined in| a0777e2d_7e90_b69c_255a_fe48677d448a 9e08bc54_4081_9437_d308_655eff9c1687["traversePrunedScope()"] a9c6b7d9_4ec5_27f1_c527_5516a037bb60 -->|calls| 9e08bc54_4081_9437_d308_655eff9c1687 6170a433_a27a_7455_6589_a23a789d4771["visitPrunedScope()"] a9c6b7d9_4ec5_27f1_c527_5516a037bb60 -->|calls| 6170a433_a27a_7455_6589_a23a789d4771 85046cfe_6315_ef8a_3c37_15f5a0fd2b46["isPrimitiveType()"] a9c6b7d9_4ec5_27f1_c527_5516a037bb60 -->|calls| 85046cfe_6315_ef8a_3c37_15f5a0fd2b46 f3301f69_e1c4_2764_56ed_201c37c731c4["isStableRefType()"] a9c6b7d9_4ec5_27f1_c527_5516a037bb60 -->|calls| f3301f69_e1c4_2764_56ed_201c37c731c4 style a9c6b7d9_4ec5_27f1_c527_5516a037bb60 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/CollectReactiveIdentifiers.ts lines 48–62
override visitPrunedScope(
scopeBlock: PrunedReactiveScopeBlock,
state: Set<IdentifierId>,
): void {
this.traversePrunedScope(scopeBlock, state);
for (const [id, decl] of scopeBlock.scope.declarations) {
if (
!isPrimitiveType(decl.identifier) &&
!isStableRefType(decl.identifier, state)
) {
state.add(id);
}
}
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does visitPrunedScope() do?
visitPrunedScope() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/CollectReactiveIdentifiers.ts.
Where is visitPrunedScope() defined?
visitPrunedScope() is defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/CollectReactiveIdentifiers.ts at line 48.
What does visitPrunedScope() call?
visitPrunedScope() calls 4 function(s): isPrimitiveType, isStableRefType, traversePrunedScope, visitPrunedScope.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free