Home / Function/ Component() — react Function Reference

Component() — react Function Reference

Architecture documentation for the Component() function in phi-type-inference-property-store.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  1cab56a7_9690_bbfb_de56_49a25fdeb897["Component()"]
  956c164e_ffc4_0c6b_4739_22ed5bb4d2b0["phi-type-inference-property-store.js"]
  1cab56a7_9690_bbfb_de56_49a25fdeb897 -->|defined in| 956c164e_ffc4_0c6b_4739_22ed5bb4d2b0
  style 1cab56a7_9690_bbfb_de56_49a25fdeb897 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/phi-type-inference-property-store.js lines 2–17

function Component(props) {
  const x = {};
  let y;
  if (props.cond) {
    y = {};
  } else {
    y = {a: props.a};
  }
  // This should be inferred as `<store> y` s.t. `x` can still
  // be independently memoized. *But* this also must properly
  // extend the mutable range of the object literals in the
  // if/else branches
  y.x = x;

  return [x, y];
}

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/propagate-scope-deps-hir-fork/phi-type-inference-property-store.js.
Where is Component() defined?
Component() is defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/phi-type-inference-property-store.js at line 2.

Analyze Your Own Codebase

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

Try Supermodel Free