State Class — react Architecture
Architecture documentation for the State class in ExtractScopeDeclarationsFromDestructuring.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 6c19677c_3912_5004_f734_b3f01840a004["State"] 791ee72b_8a79_10a6_5a13_5297a1e50d89["ExtractScopeDeclarationsFromDestructuring.ts"] 6c19677c_3912_5004_f734_b3f01840a004 -->|defined in| 791ee72b_8a79_10a6_5a13_5297a1e50d89 1ab2841f_8064_e69f_f943_b3bcdeb887c1["constructor()"] 6c19677c_3912_5004_f734_b3f01840a004 -->|method| 1ab2841f_8064_e69f_f943_b3bcdeb887c1
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/ExtractScopeDeclarationsFromDestructuring.ts lines 93–104
class State {
env: Environment;
/**
* We need to track which program variables are already declared to convert
* declarations into reassignments, so we use DeclarationId
*/
declared: Set<DeclarationId> = new Set();
constructor(env: Environment) {
this.env = env;
}
}
Domain
Source
Frequently Asked Questions
What is the State class?
State is a class in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/ExtractScopeDeclarationsFromDestructuring.ts.
Where is State defined?
State is defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/ExtractScopeDeclarationsFromDestructuring.ts at line 93.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free