Home / Function/ getFunctionName() — react Function Reference

getFunctionName() — react Function Reference

Architecture documentation for the getFunctionName() function in PrintHIR.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  2b0644d7_3881_88a9_fdf0_a00d41de5414["getFunctionName()"]
  6976a9ee_9d8e_4f16_3016_495f39aff2fd["PrintHIR.ts"]
  2b0644d7_3881_88a9_fdf0_a00d41de5414 -->|defined in| 6976a9ee_9d8e_4f16_3016_495f39aff2fd
  f3619b34_2818_79d3_d2a6_72b9bcfc9d1e["printInstructionValue()"]
  f3619b34_2818_79d3_d2a6_72b9bcfc9d1e -->|calls| 2b0644d7_3881_88a9_fdf0_a00d41de5414
  style 2b0644d7_3881_88a9_fdf0_a00d41de5414 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/HIR/PrintHIR.ts lines 919–929

function getFunctionName(
  instrValue: ObjectMethod | FunctionExpression,
  defaultValue: string,
): string {
  switch (instrValue.kind) {
    case 'FunctionExpression':
      return instrValue.name ?? defaultValue;
    case 'ObjectMethod':
      return defaultValue;
  }
}

Subdomains

Frequently Asked Questions

What does getFunctionName() do?
getFunctionName() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/PrintHIR.ts.
Where is getFunctionName() defined?
getFunctionName() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/PrintHIR.ts at line 919.
What calls getFunctionName()?
getFunctionName() is called by 1 function(s): printInstructionValue.

Analyze Your Own Codebase

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

Try Supermodel Free