Home / File/ conditional-on-mutable.js — react Source File

conditional-on-mutable.js — react Source File

Architecture documentation for conditional-on-mutable.js, a javascript file in the react codebase.

Entity Profile

Relationship Graph

Source Code

function ComponentA(props) {
  const a = [];
  const b = [];
  if (b) {
    a.push(props.p0);
  }
  if (props.p1) {
    b.push(props.p2);
  }
  return <Foo a={a} b={b} />;
}

function ComponentB(props) {
  const a = [];
  const b = [];
  if (mayMutate(b)) {
    a.push(props.p0);
  }
  if (props.p1) {
    b.push(props.p2);
  }
  return <Foo a={a} b={b} />;
}

function Foo() {}
function mayMutate() {}

Subdomains

Frequently Asked Questions

What does conditional-on-mutable.js do?
conditional-on-mutable.js is a source file in the react codebase, written in javascript. It belongs to the TestingUtilities domain, Fixtures subdomain.
What functions are defined in conditional-on-mutable.js?
conditional-on-mutable.js defines 4 function(s): ComponentA, ComponentB, Foo, mayMutate.
Where is conditional-on-mutable.js in the architecture?
conditional-on-mutable.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/conditional-on-mutable.js (domain: TestingUtilities, subdomain: Fixtures, directory: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler).

Analyze Your Own Codebase

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

Try Supermodel Free