Home / Function/ normalizeSourceLoc() — react Function Reference

normalizeSourceLoc() — react Function Reference

Architecture documentation for the normalizeSourceLoc() function in ReactHooksInspection-test.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  4f4b7a6d_0bb8_3cc3_ca16_5c6986a224f9["normalizeSourceLoc()"]
  e9ab7b21_6f0e_40d1_a839_95b24c3b785d["ReactHooksInspection-test.js"]
  4f4b7a6d_0bb8_3cc3_ca16_5c6986a224f9 -->|defined in| e9ab7b21_6f0e_40d1_a839_95b24c3b785d
  style 4f4b7a6d_0bb8_3cc3_ca16_5c6986a224f9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-debug-tools/src/__tests__/ReactHooksInspection-test.js lines 16–26

function normalizeSourceLoc(tree) {
  tree.forEach(node => {
    if (node.hookSource) {
      node.hookSource.fileName = '**';
      node.hookSource.lineNumber = 0;
      node.hookSource.columnNumber = 0;
    }
    normalizeSourceLoc(node.subHooks);
  });
  return tree;
}

Domain

Subdomains

Frequently Asked Questions

What does normalizeSourceLoc() do?
normalizeSourceLoc() is a function in the react codebase, defined in packages/react-debug-tools/src/__tests__/ReactHooksInspection-test.js.
Where is normalizeSourceLoc() defined?
normalizeSourceLoc() is defined in packages/react-debug-tools/src/__tests__/ReactHooksInspection-test.js at line 16.

Analyze Your Own Codebase

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

Try Supermodel Free