Home / Type/ MemoizationLevel Type — react Architecture

MemoizationLevel Type — react Architecture

Architecture documentation for the MemoizationLevel type/interface in PruneNonEscapingScopes.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  b996378f_baf8_cb21_7e26_ec1952f8901c["MemoizationLevel"]
  c4112963_95fe_d8ed_3bfd_f6d45887acb7["PruneNonEscapingScopes.ts"]
  b996378f_baf8_cb21_7e26_ec1952f8901c -->|defined in| c4112963_95fe_d8ed_3bfd_f6d45887acb7
  style b996378f_baf8_cb21_7e26_ec1952f8901c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PruneNonEscapingScopes.ts lines 144–159

enum MemoizationLevel {
  // The value should be memoized if it escapes
  Memoized = 'Memoized',
  /*
   * Values that are memoized if their dependencies are memoized (used for logical/ternary and
   * other expressions that propagate dependencies wo changing them)
   */
  Conditional = 'Conditional',
  /*
   * Values that cannot be compared with Object.is, but which by default don't need to be memoized
   * unless forced
   */
  Unmemoized = 'Unmemoized',
  // The value will never be memoized: used for values that can be cheaply compared w Object.is
  Never = 'Never',
}

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free