Home / Function/ isAlwaysInvalidatingType() — react Function Reference

isAlwaysInvalidatingType() — react Function Reference

Architecture documentation for the isAlwaysInvalidatingType() function in MergeReactiveScopesThatInvalidateTogether.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  aed61a37_60c8_9eae_ac35_b13a46157096["isAlwaysInvalidatingType()"]
  006711fe_6949_9be8_4726_2031284f3328["MergeReactiveScopesThatInvalidateTogether.ts"]
  aed61a37_60c8_9eae_ac35_b13a46157096 -->|defined in| 006711fe_6949_9be8_4726_2031284f3328
  f767b6e4_1078_08b0_bc4b_f27f690658e6["canMergeScopes()"]
  f767b6e4_1078_08b0_bc4b_f27f690658e6 -->|calls| aed61a37_60c8_9eae_ac35_b13a46157096
  432e8f07_8888_739b_b310_8ed9622fdd73["scopeIsEligibleForMerging()"]
  432e8f07_8888_739b_b310_8ed9622fdd73 -->|calls| aed61a37_60c8_9eae_ac35_b13a46157096
  style aed61a37_60c8_9eae_ac35_b13a46157096 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/MergeReactiveScopesThatInvalidateTogether.ts lines 504–522

export function isAlwaysInvalidatingType(type: Type): boolean {
  switch (type.kind) {
    case 'Object': {
      switch (type.shapeId) {
        case BuiltInArrayId:
        case BuiltInObjectId:
        case BuiltInFunctionId:
        case BuiltInJsxId: {
          return true;
        }
      }
      break;
    }
    case 'Function': {
      return true;
    }
  }
  return false;
}

Domain

Subdomains

Frequently Asked Questions

What does isAlwaysInvalidatingType() do?
isAlwaysInvalidatingType() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/MergeReactiveScopesThatInvalidateTogether.ts.
Where is isAlwaysInvalidatingType() defined?
isAlwaysInvalidatingType() is defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/MergeReactiveScopesThatInvalidateTogether.ts at line 504.
What calls isAlwaysInvalidatingType()?
isAlwaysInvalidatingType() is called by 2 function(s): canMergeScopes, scopeIsEligibleForMerging.

Analyze Your Own Codebase

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

Try Supermodel Free