Home / Function/ Component() — react Function Reference

Component() — react Function Reference

Architecture documentation for the Component() function in repro-cx-assigned-to-temporary.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  d5f94651_7c48_ec2c_8231_41adcc93663b["Component()"]
  16802089_c6c8_593f_6c7b_1fde4f6451dd["repro-cx-assigned-to-temporary.js"]
  d5f94651_7c48_ec2c_8231_41adcc93663b -->|defined in| 16802089_c6c8_593f_6c7b_1fde4f6451dd
  3f787fb6_5e44_9f50_cef7_de78c4d27184["useTheme()"]
  d5f94651_7c48_ec2c_8231_41adcc93663b -->|calls| 3f787fb6_5e44_9f50_cef7_de78c4d27184
  592e95fc_4fb7_0730_b8fe_f55e69698fe4["cx()"]
  d5f94651_7c48_ec2c_8231_41adcc93663b -->|calls| 592e95fc_4fb7_0730_b8fe_f55e69698fe4
  style d5f94651_7c48_ec2c_8231_41adcc93663b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/meta-isms/repro-cx-assigned-to-temporary.js lines 6–16

function Component() {
  const theme = useTheme();
  return (
    <div
      className={cx({
        'styles/light': true,
        'styles/dark': theme.getTheme() === DARK,
      })}
    />
  );
}

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/meta-isms/repro-cx-assigned-to-temporary.js.
Where is Component() defined?
Component() is defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/meta-isms/repro-cx-assigned-to-temporary.js at line 6.
What does Component() call?
Component() calls 2 function(s): cx, useTheme.

Analyze Your Own Codebase

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

Try Supermodel Free