Home / Function/ Component() — react Function Reference

Component() — react Function Reference

Architecture documentation for the Component() function in mutable-liverange-loop.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  a74b1e89_6a80_54f2_8257_5b283c33d557["Component()"]
  9f39066e_6902_216f_dcf1_121704be682f["mutable-liverange-loop.js"]
  a74b1e89_6a80_54f2_8257_5b283c33d557 -->|defined in| 9f39066e_6902_216f_dcf1_121704be682f
  cfd5ed1b_b031_0d7f_ff4a_d45e69230a42["mutate()"]
  a74b1e89_6a80_54f2_8257_5b283c33d557 -->|calls| cfd5ed1b_b031_0d7f_ff4a_d45e69230a42
  e89a75a9_ad5c_0f02_1fd4_c6bf72ef6615["cond()"]
  a74b1e89_6a80_54f2_8257_5b283c33d557 -->|calls| e89a75a9_ad5c_0f02_1fd4_c6bf72ef6615
  style a74b1e89_6a80_54f2_8257_5b283c33d557 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/mutable-liverange-loop.js lines 4–29

function Component(props) {
  let a = {};
  let b = {};
  let c = {};
  let d = {};
  while (true) {
    mutate(a, b);
    if (cond(a)) {
      break;
    }
  }

  // all of these tests are seemingly readonly, since the values are never directly
  // mutated again. but they are all aliased by `d`, which is later modified, and
  // these are therefore mutable references:
  if (a) {
  }
  if (b) {
  }
  if (c) {
  }
  if (d) {
  }

  mutate(d, null);
}

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/mutable-liverange-loop.js.
Where is Component() defined?
Component() is defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/mutable-liverange-loop.js at line 4.
What does Component() call?
Component() calls 2 function(s): cond, mutate.

Analyze Your Own Codebase

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

Try Supermodel Free