Home / Function/ primaryLocation() — react Function Reference

primaryLocation() — react Function Reference

Architecture documentation for the primaryLocation() function in CompilerError.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  915eda22_ad87_20ae_ed69_dc0bfeb9fb8f["primaryLocation()"]
  0fda7f86_b7a3_c1f2_f0d9_8d13eed4f042["CompilerDiagnostic"]
  915eda22_ad87_20ae_ed69_dc0bfeb9fb8f -->|defined in| 0fda7f86_b7a3_c1f2_f0d9_8d13eed4f042
  00c689b1_d881_800b_f1df_076ada6a2c75["toString()"]
  00c689b1_d881_800b_f1df_076ada6a2c75 -->|calls| 915eda22_ad87_20ae_ed69_dc0bfeb9fb8f
  808e0685_f81d_fe6a_783d_8e22e744f71a["primaryLocation()"]
  808e0685_f81d_fe6a_783d_8e22e744f71a -->|calls| 915eda22_ad87_20ae_ed69_dc0bfeb9fb8f
  245c8b9a_b32e_79de_a175_090fb6c9757e["hashEffect()"]
  245c8b9a_b32e_79de_a175_090fb6c9757e -->|calls| 915eda22_ad87_20ae_ed69_dc0bfeb9fb8f
  808e0685_f81d_fe6a_783d_8e22e744f71a["primaryLocation()"]
  915eda22_ad87_20ae_ed69_dc0bfeb9fb8f -->|calls| 808e0685_f81d_fe6a_783d_8e22e744f71a
  style 915eda22_ad87_20ae_ed69_dc0bfeb9fb8f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/CompilerError.ts lines 156–163

  primaryLocation(): SourceLocation | null {
    const firstErrorDetail = this.options.details.filter(
      d => d.kind === 'error',
    )[0];
    return firstErrorDetail != null && firstErrorDetail.kind === 'error'
      ? firstErrorDetail.loc
      : null;
  }

Domain

Subdomains

Frequently Asked Questions

What does primaryLocation() do?
primaryLocation() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/CompilerError.ts.
Where is primaryLocation() defined?
primaryLocation() is defined in compiler/packages/babel-plugin-react-compiler/src/CompilerError.ts at line 156.
What does primaryLocation() call?
primaryLocation() calls 1 function(s): primaryLocation.
What calls primaryLocation()?
primaryLocation() is called by 3 function(s): hashEffect, primaryLocation, toString.

Analyze Your Own Codebase

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

Try Supermodel Free