Home / File/ primitive-as-dep-nested-scope.js — react Source File

primitive-as-dep-nested-scope.js — react Source File

Architecture documentation for primitive-as-dep-nested-scope.js, a javascript file in the react codebase. 1 imports, 0 dependents.

File javascript TestingUtilities Fixtures 1 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  72dceba1_1c15_fb86_5dfe_317bc7ff2171["primitive-as-dep-nested-scope.js"]
  006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"]
  72dceba1_1c15_fb86_5dfe_317bc7ff2171 --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05
  style 72dceba1_1c15_fb86_5dfe_317bc7ff2171 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// props.b + 1 is an non-allocating expression, which means Forget can
// emit it trivially and repeatedly (e.g. no need to memoize props.b + 1
// separately from props.b)
// Correctness:

import {identity, mutate, setProperty} from 'shared-runtime';

//   y depends on either props.b or props.b + 1
function PrimitiveAsDepNested(props) {
  let x = {};
  mutate(x);
  let y = identity(props.b + 1);
  setProperty(x, props.a);
  return [x, y];
}

export const FIXTURE_ENTRYPOINT = {
  fn: PrimitiveAsDepNested,
  params: [{a: 1, b: 2}],
  sequentialRenders: [
    // change b
    {a: 1, b: 3},
    // change b
    {a: 1, b: 4},
    // change a
    {a: 2, b: 4},
    // change a
    {a: 3, b: 4},
  ],
};

Subdomains

Dependencies

  • shared-runtime

Frequently Asked Questions

What does primitive-as-dep-nested-scope.js do?
primitive-as-dep-nested-scope.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 primitive-as-dep-nested-scope.js?
primitive-as-dep-nested-scope.js defines 1 function(s): PrimitiveAsDepNested.
What does primitive-as-dep-nested-scope.js depend on?
primitive-as-dep-nested-scope.js imports 1 module(s): shared-runtime.
Where is primitive-as-dep-nested-scope.js in the architecture?
primitive-as-dep-nested-scope.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/primitive-as-dep-nested-scope.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