Home / Type/ State Type — react Architecture

State Type — react Architecture

Architecture documentation for the State type/interface in PromoteUsedTemporaries.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  8e2dddf9_6dba_1991_31be_506ac0dcbdd2["State"]
  dea6b9e7_3c69_6e86_5d64_ba83c7d43ed6["PromoteUsedTemporaries.ts"]
  8e2dddf9_6dba_1991_31be_506ac0dcbdd2 -->|defined in| dea6b9e7_3c69_6e86_5d64_ba83c7d43ed6
  style 8e2dddf9_6dba_1991_31be_506ac0dcbdd2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PromoteUsedTemporaries.ts lines 173–180

type State = {
  tags: JsxExpressionTags;
  promoted: Set<DeclarationId>;
  pruned: Map<
    DeclarationId,
    {activeScopes: Array<ScopeId>; usedOutsideScope: boolean}
  >; // true if referenced within another scope, false if only accessed outside of scopes
};

Frequently Asked Questions

What is the State type?
State is a type/interface in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PromoteUsedTemporaries.ts.
Where is State defined?
State is defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PromoteUsedTemporaries.ts at line 173.

Analyze Your Own Codebase

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

Try Supermodel Free