Home / Function/ Component() — react Function Reference

Component() — react Function Reference

Architecture documentation for the Component() function in timers.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  9c530c6d_3835_408f_e287_afe2755026f9["Component()"]
  c138548c_9e48_0f1e_bb58_524cf5ebf502["timers.js"]
  9c530c6d_3835_408f_e287_afe2755026f9 -->|defined in| c138548c_9e48_0f1e_bb58_524cf5ebf502
  style 9c530c6d_3835_408f_e287_afe2755026f9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/timers.js lines 1–10

function Component(props) {
  const start = performance.now();
  const now = Date.now();
  const time = performance.now() - start;
  return (
    <div>
      rendering took {time} at {now}
    </div>
  );
}

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/timers.js.
Where is Component() defined?
Component() is defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/timers.js at line 1.

Analyze Your Own Codebase

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

Try Supermodel Free