Home / Function/ normalizeComponentStack() — react Function Reference

normalizeComponentStack() — react Function Reference

Architecture documentation for the normalizeComponentStack() function in consoleMock.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  f20057f4_a888_4299_3a61_2cb4bf74d7be["normalizeComponentStack()"]
  9565063b_3ea2_9cbf_86d6_3ee1e66bf4cc["consoleMock.js"]
  f20057f4_a888_4299_3a61_2cb4bf74d7be -->|defined in| 9565063b_3ea2_9cbf_86d6_3ee1e66bf4cc
  4a201017_c5d4_ab2f_492d_01639fabcea7["isLikelyAComponentStack()"]
  f20057f4_a888_4299_3a61_2cb4bf74d7be -->|calls| 4a201017_c5d4_ab2f_492d_01639fabcea7
  0fe2f8cd_c150_9d2c_71e5_070117635df6["normalizeCodeLocInfo()"]
  f20057f4_a888_4299_3a61_2cb4bf74d7be -->|calls| 0fe2f8cd_c150_9d2c_71e5_070117635df6
  style f20057f4_a888_4299_3a61_2cb4bf74d7be fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/internal-test-utils/consoleMock.js lines 218–229

function normalizeComponentStack(entry) {
  if (
    typeof entry[0] === 'string' &&
    entry[0].endsWith('%s') &&
    isLikelyAComponentStack(entry[entry.length - 1])
  ) {
    const clone = entry.slice(0);
    clone[clone.length - 1] = normalizeCodeLocInfo(entry[entry.length - 1]);
    return clone;
  }
  return entry;
}

Domain

Subdomains

Frequently Asked Questions

What does normalizeComponentStack() do?
normalizeComponentStack() is a function in the react codebase, defined in packages/internal-test-utils/consoleMock.js.
Where is normalizeComponentStack() defined?
normalizeComponentStack() is defined in packages/internal-test-utils/consoleMock.js at line 218.
What does normalizeComponentStack() call?
normalizeComponentStack() calls 2 function(s): isLikelyAComponentStack, normalizeCodeLocInfo.

Analyze Your Own Codebase

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

Try Supermodel Free