Home / File/ promote-uncond.js — react Source File

promote-uncond.js — react Source File

Architecture documentation for promote-uncond.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
  c509f189_712e_8f01_ac6d_090f4c458deb["promote-uncond.js"]
  006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"]
  c509f189_712e_8f01_ac6d_090f4c458deb --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05
  style c509f189_712e_8f01_ac6d_090f4c458deb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// When a conditional dependency `props.a.b.c` has no unconditional dependency
// in its subpath or superpath, we should find the nearest unconditional access

import {identity} from 'shared-runtime';

// and promote it to an unconditional dependency.
function usePromoteUnconditionalAccessToDependency(props, other) {
  const x = {};
  x.a = props.a.a.a;
  if (identity(other)) {
    x.c = props.a.b.c;
  }
  return x;
}

export const FIXTURE_ENTRYPOINT = {
  fn: usePromoteUnconditionalAccessToDependency,
  params: [{a: {a: {a: 3}}}, false],
};

Subdomains

Dependencies

  • shared-runtime

Frequently Asked Questions

What does promote-uncond.js do?
promote-uncond.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 promote-uncond.js?
promote-uncond.js defines 1 function(s): usePromoteUnconditionalAccessToDependency.
What does promote-uncond.js depend on?
promote-uncond.js imports 1 module(s): shared-runtime.
Where is promote-uncond.js in the architecture?
promote-uncond.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/reduce-reactive-deps/promote-uncond.js (domain: TestingUtilities, subdomain: Fixtures, directory: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/reduce-reactive-deps).

Analyze Your Own Codebase

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

Try Supermodel Free