Home / File/ independent-across-if.js — react Source File

independent-across-if.js — react Source File

Architecture documentation for independent-across-if.js, a javascript file in the react codebase.

Entity Profile

Relationship Graph

Source Code

function compute() {}
function mutate() {}
function foo() {}
function Foo() {}

/**
 * Should produce 3 scopes:
 *
 * a: inputs=props.a & props.c; outputs=a
 *   a = compute(props.a);
 *   if (props.c)
 *     mutate(a)
 * b: inputs=props.b & props.c; outputs=b
 *   b = compute(props.b);
 *   if (props.c)
 *     mutate(b)
 * return: inputs=a, b outputs=return
 *   return = <Foo a={a} b={b} />
 */
function Component(props) {
  const a = compute(props.a);
  const b = compute(props.b);
  if (props.c) {
    mutate(a);
    mutate(b);
  }
  return <Foo a={a} b={b} />;
}

Subdomains

Frequently Asked Questions

What does independent-across-if.js do?
independent-across-if.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 independent-across-if.js?
independent-across-if.js defines 5 function(s): Component, Foo, compute, foo, mutate.
Where is independent-across-if.js in the architecture?
independent-across-if.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/independent-across-if.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