Home / Function/ Component() — react Function Reference

Component() — react Function Reference

Architecture documentation for the Component() function in repro-local-mutation-of-new-object-from-destructured-prop.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  d6a979dc_47f6_f1a8_76aa_478b317f97b6["Component()"]
  81c4abc2_17ea_ffd9_15ed_eab8003bec54["repro-local-mutation-of-new-object-from-destructured-prop.js"]
  d6a979dc_47f6_f1a8_76aa_478b317f97b6 -->|defined in| 81c4abc2_17ea_ffd9_15ed_eab8003bec54
  style d6a979dc_47f6_f1a8_76aa_478b317f97b6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-local-mutation-of-new-object-from-destructured-prop.js lines 3–9

function Component(props) {
  const {a} = props;
  const {b, ...rest} = a;
  // Local mutation of `rest` is allowed since it is a newly allocated object
  rest.value = props.value;
  return <Stringify rest={rest} />;
}

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/repro-local-mutation-of-new-object-from-destructured-prop.js.
Where is Component() defined?
Component() is defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-local-mutation-of-new-object-from-destructured-prop.js at line 3.

Analyze Your Own Codebase

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

Try Supermodel Free