Home / Function/ forEach() — react Function Reference

forEach() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  4c434fb2_75ab_6c2c_c237_b1d38a1b0141["forEach()"]
  1765a682_3028_4441_b26f_c712ca2597d5["DisjointSet"]
  4c434fb2_75ab_6c2c_c237_b1d38a1b0141 -->|defined in| 1765a682_3028_4441_b26f_c712ca2597d5
  ee1add24_e8b1_776d_87ba_d88fe78f7873["mergeOverlappingReactiveScopesHIR()"]
  ee1add24_e8b1_776d_87ba_d88fe78f7873 -->|calls| 4c434fb2_75ab_6c2c_c237_b1d38a1b0141
  3f9f0373_2e57_1356_bd68_e2eec897e2f5["printHIR()"]
  3f9f0373_2e57_1356_bd68_e2eec897e2f5 -->|calls| 4c434fb2_75ab_6c2c_c237_b1d38a1b0141
  809a0fbd_e458_a174_789b_dc2fd017231a["printTerminal()"]
  809a0fbd_e458_a174_789b_dc2fd017231a -->|calls| 4c434fb2_75ab_6c2c_c237_b1d38a1b0141
  bdad7522_9507_6e0a_8551_e304482ab97e["alignMethodCallScopes()"]
  bdad7522_9507_6e0a_8551_e304482ab97e -->|calls| 4c434fb2_75ab_6c2c_c237_b1d38a1b0141
  956ca4bb_7b0f_7eb2_4fbb_bda123ddbc98["inferReactiveScopeVariables()"]
  956ca4bb_7b0f_7eb2_4fbb_bda123ddbc98 -->|calls| 4c434fb2_75ab_6c2c_c237_b1d38a1b0141
  f6a9b2b0_32d7_a868_9762_f6fe2182d587["visitInstruction()"]
  f6a9b2b0_32d7_a868_9762_f6fe2182d587 -->|calls| 4c434fb2_75ab_6c2c_c237_b1d38a1b0141
  eb5a8bba_982f_3e93_34ad_57191041e6d7["visitScope()"]
  eb5a8bba_982f_3e93_34ad_57191041e6d7 -->|calls| 4c434fb2_75ab_6c2c_c237_b1d38a1b0141
  631ac101_c6b9_8c55_7557_0bce62532665["buildSets()"]
  631ac101_c6b9_8c55_7557_0bce62532665 -->|calls| 4c434fb2_75ab_6c2c_c237_b1d38a1b0141
  74efde51_a311_d84c_0e23_ddafd072e338["find()"]
  4c434fb2_75ab_6c2c_c237_b1d38a1b0141 -->|calls| 74efde51_a311_d84c_0e23_ddafd072e338
  style 4c434fb2_75ab_6c2c_c237_b1d38a1b0141 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/Utils/DisjointSet.ts lines 101–106

  forEach(fn: (item: T, group: T) => void): void {
    for (const item of this.#entries.keys()) {
      const group = this.find(item)!;
      fn(item, group);
    }
  }

Domain

Subdomains

Calls

Frequently Asked Questions

What does forEach() do?
forEach() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/Utils/DisjointSet.ts.
Where is forEach() defined?
forEach() is defined in compiler/packages/babel-plugin-react-compiler/src/Utils/DisjointSet.ts at line 101.
What does forEach() call?
forEach() calls 1 function(s): find.
What calls forEach()?
forEach() is called by 8 function(s): alignMethodCallScopes, buildSets, inferReactiveScopeVariables, mergeOverlappingReactiveScopesHIR, printHIR, printTerminal, visitInstruction, visitScope.

Analyze Your Own Codebase

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

Try Supermodel Free