Home / Function/ Component() — react Function Reference

Component() — react Function Reference

Architecture documentation for the Component() function in repro-array-map-known-mutate-shape.tsx from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  259fc3a8_9131_abbb_3987_38276a4b442a["Component()"]
  47fc4d79_6172_efa5_50f5_718b7b56c9d2["repro-array-map-known-mutate-shape.tsx"]
  259fc3a8_9131_abbb_3987_38276a4b442a -->|defined in| 47fc4d79_6172_efa5_50f5_718b7b56c9d2
  style 259fc3a8_9131_abbb_3987_38276a4b442a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/global-types/repro-array-map-known-mutate-shape.tsx lines 7–21

function Component({value}) {
  const arr = [
    new Set([['foo', 2]]).values(),
    new Set([['bar', 4]]).values(),
    [['baz', value]],
  ];
  useIdentity(null);
  const derived = arr.map(Object.fromEntries);
  return (
    <Stringify>
      {derived.at(0)}
      {derived.at(-1)}
    </Stringify>
  );
}

Subdomains

Frequently Asked Questions

What does Component() do?
Component() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/global-types/repro-array-map-known-mutate-shape.tsx.
Where is Component() defined?
Component() is defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/global-types/repro-array-map-known-mutate-shape.tsx at line 7.

Analyze Your Own Codebase

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

Try Supermodel Free