Home / Function/ Component() — react Function Reference

Component() — react Function Reference

Architecture documentation for the Component() function in capturing-func-alias-captured-mutate.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  c8323f58_da89_2e33_5a74_87bebd7d5ed2["Component()"]
  959dee1b_f694_98fe_af03_f0768191de24["capturing-func-alias-captured-mutate.js"]
  c8323f58_da89_2e33_5a74_87bebd7d5ed2 -->|defined in| 959dee1b_f694_98fe_af03_f0768191de24
  style c8323f58_da89_2e33_5a74_87bebd7d5ed2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/capturing-func-alias-captured-mutate.js lines 3–15

function Component({foo, bar}) {
  let x = {foo};
  let y = {bar};
  const f0 = function () {
    let a = [y];
    let b = x;
    // this writes y.x = x
    a[0].x = b;
  };
  f0();
  mutate(y.x);
  return y;
}

Domain

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/capturing-func-alias-captured-mutate.js.
Where is Component() defined?
Component() is defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/capturing-func-alias-captured-mutate.js at line 3.

Analyze Your Own Codebase

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

Try Supermodel Free