Home / Function/ join() — react Function Reference

join() — react Function Reference

Architecture documentation for the join() function in PruneInitializationDependencies.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  a7715c66_6895_207b_7553_143987538107["join()"]
  e1b0b28f_0a55_63f6_4092_ecaa28a68023["Visitor"]
  a7715c66_6895_207b_7553_143987538107 -->|defined in| e1b0b28f_0a55_63f6_4092_ecaa28a68023
  1f4c3be2_48dd_6671_2858_1a62b1026c5e["visitPlace()"]
  1f4c3be2_48dd_6671_2858_1a62b1026c5e -->|calls| a7715c66_6895_207b_7553_143987538107
  f6a9b2b0_32d7_a868_9762_f6fe2182d587["visitInstruction()"]
  f6a9b2b0_32d7_a868_9762_f6fe2182d587 -->|calls| a7715c66_6895_207b_7553_143987538107
  eb5a8bba_982f_3e93_34ad_57191041e6d7["visitScope()"]
  eb5a8bba_982f_3e93_34ad_57191041e6d7 -->|calls| a7715c66_6895_207b_7553_143987538107
  d7fde76c_4fd9_feb3_299b_798689f05bc6["assertExhaustive()"]
  a7715c66_6895_207b_7553_143987538107 -->|calls| d7fde76c_4fd9_feb3_299b_798689f05bc6
  style a7715c66_6895_207b_7553_143987538107 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PruneInitializationDependencies.ts lines 82–94

  join(values: Array<CreateUpdate>): CreateUpdate {
    function join2(l: CreateUpdate, r: CreateUpdate): CreateUpdate {
      if (l === 'Update' || r === 'Update') {
        return 'Update';
      } else if (l === 'Create' || r === 'Create') {
        return 'Create';
      } else if (l === 'Unknown' || r === 'Unknown') {
        return 'Unknown';
      }
      assertExhaustive(r, `Unhandled variable kind ${r}`);
    }
    return values.reduce(join2, 'Unknown');
  }

Domain

Subdomains

Frequently Asked Questions

What does join() do?
join() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PruneInitializationDependencies.ts.
Where is join() defined?
join() is defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PruneInitializationDependencies.ts at line 82.
What does join() call?
join() calls 1 function(s): assertExhaustive.
What calls join()?
join() is called by 3 function(s): visitInstruction, visitPlace, visitScope.

Analyze Your Own Codebase

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

Try Supermodel Free