Home / Function/ Component() — react Function Reference

Component() — react Function Reference

Architecture documentation for the Component() function in repro-object-expression-computed-key-modified-during-after-construction-hoisted-sequence-expr.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  629eb25a_6196_4298_3982_84bacd27f0a8["Component()"]
  1823ce6e_a616_5fb1_8c4a_ab8b8c258380["repro-object-expression-computed-key-modified-during-after-construction-hoisted-sequence-expr.js"]
  629eb25a_6196_4298_3982_84bacd27f0a8 -->|defined in| 1823ce6e_a616_5fb1_8c4a_ab8b8c258380
  style 629eb25a_6196_4298_3982_84bacd27f0a8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-object-expression-computed-key-modified-during-after-construction-hoisted-sequence-expr.js lines 19–28

function Component(props) {
  const key = {};
  const tmp = (mutate(key), key);
  const context = {
    // Here, `tmp` is frozen (as it's inferred to be a primitive/string)
    [tmp]: identity([props.value]),
  };
  mutate(key);
  return [context, key];
}

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-object-expression-computed-key-modified-during-after-construction-hoisted-sequence-expr.js.
Where is Component() defined?
Component() is defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-object-expression-computed-key-modified-during-after-construction-hoisted-sequence-expr.js at line 19.

Analyze Your Own Codebase

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

Try Supermodel Free