Home / Function/ isStableTypeContainer() — react Function Reference

isStableTypeContainer() — react Function Reference

Architecture documentation for the isStableTypeContainer() function in HIR.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  137e06c9_a69f_8b3a_fa86_636e5d30293b["isStableTypeContainer()"]
  18a78965_f593_105b_e5e8_07001321c2ec["HIR.ts"]
  137e06c9_a69f_8b3a_fa86_636e5d30293b -->|defined in| 18a78965_f593_105b_e5e8_07001321c2ec
  4441ccab_cb7c_dbad_b731_058c134a8419["isUseStateType()"]
  137e06c9_a69f_8b3a_fa86_636e5d30293b -->|calls| 4441ccab_cb7c_dbad_b731_058c134a8419
  1180868c_6dfc_4742_9ad7_ea44117bb394["isUseActionStateType()"]
  137e06c9_a69f_8b3a_fa86_636e5d30293b -->|calls| 1180868c_6dfc_4742_9ad7_ea44117bb394
  26484619_b1d8_f562_c993_01ec33afa52b["isUseReducerType()"]
  137e06c9_a69f_8b3a_fa86_636e5d30293b -->|calls| 26484619_b1d8_f562_c993_01ec33afa52b
  fddbf8a5_a846_c806_6b19_4cd568501744["isUseOptimisticType()"]
  137e06c9_a69f_8b3a_fa86_636e5d30293b -->|calls| fddbf8a5_a846_c806_6b19_4cd568501744
  style 137e06c9_a69f_8b3a_fa86_636e5d30293b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts lines 1913–1925

export function isStableTypeContainer(id: Identifier): boolean {
  const type_ = id.type;
  if (type_.kind !== 'Object') {
    return false;
  }
  return (
    isUseStateType(id) || // setState
    isUseActionStateType(id) || // setActionState
    isUseReducerType(id) || // dispatcher
    isUseOptimisticType(id) || // setOptimistic
    type_.shapeId === 'BuiltInUseTransition' // startTransition
  );
}

Subdomains

Frequently Asked Questions

What does isStableTypeContainer() do?
isStableTypeContainer() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts.
Where is isStableTypeContainer() defined?
isStableTypeContainer() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts at line 1913.
What does isStableTypeContainer() call?
isStableTypeContainer() calls 4 function(s): isUseActionStateType, isUseOptimisticType, isUseReducerType, isUseStateType.

Analyze Your Own Codebase

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

Try Supermodel Free