updateScopeDeclarations() — react Function Reference
Architecture documentation for the updateScopeDeclarations() function in MergeReactiveScopesThatInvalidateTogether.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 96ea77cd_c72d_e8a8_1897_f9e11e062fbe["updateScopeDeclarations()"] 006711fe_6949_9be8_4726_2031284f3328["MergeReactiveScopesThatInvalidateTogether.ts"] 96ea77cd_c72d_e8a8_1897_f9e11e062fbe -->|defined in| 006711fe_6949_9be8_4726_2031284f3328 11690004_c468_3b6b_f07f_36a6501f870a["visitBlock()"] 11690004_c468_3b6b_f07f_36a6501f870a -->|calls| 96ea77cd_c72d_e8a8_1897_f9e11e062fbe style 96ea77cd_c72d_e8a8_1897_f9e11e062fbe fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/MergeReactiveScopesThatInvalidateTogether.ts lines 405–415
function updateScopeDeclarations(
scope: ReactiveScope,
lastUsage: Map<DeclarationId, InstructionId>,
): void {
for (const [id, decl] of scope.declarations) {
const lastUsedAt = lastUsage.get(decl.identifier.declarationId)!;
if (lastUsedAt < scope.range.end) {
scope.declarations.delete(id);
}
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does updateScopeDeclarations() do?
updateScopeDeclarations() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/MergeReactiveScopesThatInvalidateTogether.ts.
Where is updateScopeDeclarations() defined?
updateScopeDeclarations() is defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/MergeReactiveScopesThatInvalidateTogether.ts at line 405.
What calls updateScopeDeclarations()?
updateScopeDeclarations() is called by 1 function(s): visitBlock.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free