Home / Function/ Component() — react Function Reference

Component() — react Function Reference

Architecture documentation for the Component() function in repro-array-filter-capture-mutate-bug.tsx from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  2e5954ef_1642_347f_819a_438e47d9e9b3["Component()"]
  247b2728_ff50_e4a1_f4a3_f305044748fc["repro-array-filter-capture-mutate-bug.tsx"]
  2e5954ef_1642_347f_819a_438e47d9e9b3 -->|defined in| 247b2728_ff50_e4a1_f4a3_f305044748fc
  style 2e5954ef_1642_347f_819a_438e47d9e9b3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/global-types/repro-array-filter-capture-mutate-bug.tsx lines 18–28

function Component({value}) {
  const arr = [{value: 'foo'}, {value: 'bar'}, {value}];
  useIdentity(null);
  const derived = arr.filter(mutateAndReturn);
  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-filter-capture-mutate-bug.tsx.
Where is Component() defined?
Component() is defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/global-types/repro-array-filter-capture-mutate-bug.tsx at line 18.

Analyze Your Own Codebase

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

Try Supermodel Free