Home / Function/ describeBuiltInComponentFrame() — react Function Reference

describeBuiltInComponentFrame() — react Function Reference

Architecture documentation for the describeBuiltInComponentFrame() function in DevToolsComponentStackFrame.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  b79d7933_7e8b_53e4_29f2_b6516a60dac8["describeBuiltInComponentFrame()"]
  c59dc57c_ed0c_b6cd_803d_b7eeab46f99e["DevToolsComponentStackFrame.js"]
  b79d7933_7e8b_53e4_29f2_b6516a60dac8 -->|defined in| c59dc57c_ed0c_b6cd_803d_b7eeab46f99e
  e40d98f8_c5d4_65cc_ca5e_14ef53f81450["describeFiber()"]
  e40d98f8_c5d4_65cc_ca5e_14ef53f81450 -->|calls| b79d7933_7e8b_53e4_29f2_b6516a60dac8
  4107a6e9_e64c_c0f0_6fdd_b5fee354334b["getOwnerStackByFiberInDev()"]
  4107a6e9_e64c_c0f0_6fdd_b5fee354334b -->|calls| b79d7933_7e8b_53e4_29f2_b6516a60dac8
  0d0f5eb3_f682_c269_a97f_22be22717aa0["getOwnerStackByComponentInfoInDev()"]
  0d0f5eb3_f682_c269_a97f_22be22717aa0 -->|calls| b79d7933_7e8b_53e4_29f2_b6516a60dac8
  f8ce27e3_0da1_4966_9299_5058a4677f17["describeDebugInfoFrame()"]
  f8ce27e3_0da1_4966_9299_5058a4677f17 -->|calls| b79d7933_7e8b_53e4_29f2_b6516a60dac8
  style b79d7933_7e8b_53e4_29f2_b6516a60dac8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-shared/src/backend/shared/DevToolsComponentStackFrame.js lines 22–41

export function describeBuiltInComponentFrame(name: string): string {
  if (prefix === undefined) {
    // Extract the VM specific prefix used by each line.
    try {
      throw Error();
    } catch (x) {
      const match = x.stack.trim().match(/\n( *(at )?)/);
      prefix = (match && match[1]) || '';
    }
  }
  let suffix = '';
  if (__IS_CHROME__ || __IS_EDGE__ || __IS_NATIVE__) {
    suffix = ' (<anonymous>)';
  } else if (__IS_FIREFOX__) {
    suffix = '@unknown:0:0';
  }
  // We use the prefix to ensure our stacks line up with native stack frames.
  // We use a suffix to ensure it gets parsed natively.
  return '\n' + prefix + name + suffix;
}

Domain

Subdomains

Frequently Asked Questions

What does describeBuiltInComponentFrame() do?
describeBuiltInComponentFrame() is a function in the react codebase, defined in packages/react-devtools-shared/src/backend/shared/DevToolsComponentStackFrame.js.
Where is describeBuiltInComponentFrame() defined?
describeBuiltInComponentFrame() is defined in packages/react-devtools-shared/src/backend/shared/DevToolsComponentStackFrame.js at line 22.
What calls describeBuiltInComponentFrame()?
describeBuiltInComponentFrame() is called by 4 function(s): describeDebugInfoFrame, describeFiber, getOwnerStackByComponentInfoInDev, getOwnerStackByFiberInDev.

Analyze Your Own Codebase

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

Try Supermodel Free