Home / Function/ canonicalize() — react Function Reference

canonicalize() — react Function Reference

Architecture documentation for the canonicalize() function in DisjointSet.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  cc6dbdb8_321f_04a6_e222_5616c33d7c7c["canonicalize()"]
  1765a682_3028_4441_b26f_c712ca2597d5["DisjointSet"]
  cc6dbdb8_321f_04a6_e222_5616c33d7c7c -->|defined in| 1765a682_3028_4441_b26f_c712ca2597d5
  a0a21769_2c81_3d16_a177_aa964620987f["alignObjectMethodScopes()"]
  a0a21769_2c81_3d16_a177_aa964620987f -->|calls| cc6dbdb8_321f_04a6_e222_5616c33d7c7c
  74efde51_a311_d84c_0e23_ddafd072e338["find()"]
  cc6dbdb8_321f_04a6_e222_5616c33d7c7c -->|calls| 74efde51_a311_d84c_0e23_ddafd072e338
  style cc6dbdb8_321f_04a6_e222_5616c33d7c7c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/Utils/DisjointSet.ts lines 88–95

  canonicalize(): Map<T, T> {
    const entries = new Map<T, T>();
    for (const item of this.#entries.keys()) {
      const root = this.find(item)!;
      entries.set(item, root);
    }
    return entries;
  }

Domain

Subdomains

Calls

Frequently Asked Questions

What does canonicalize() do?
canonicalize() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/Utils/DisjointSet.ts.
Where is canonicalize() defined?
canonicalize() is defined in compiler/packages/babel-plugin-react-compiler/src/Utils/DisjointSet.ts at line 88.
What does canonicalize() call?
canonicalize() calls 1 function(s): find.
What calls canonicalize()?
canonicalize() is called by 1 function(s): alignObjectMethodScopes.

Analyze Your Own Codebase

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

Try Supermodel Free