Home / File/ cfg-switch-missing-case.js — react Source File

cfg-switch-missing-case.js — react Source File

Architecture documentation for cfg-switch-missing-case.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
  0b2b8893_23a9_a11a_a19f_c3f38778261b["cfg-switch-missing-case.js"]
  006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"]
  0b2b8893_23a9_a11a_a19f_c3f38778261b --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05
  style 0b2b8893_23a9_a11a_a19f_c3f38778261b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// props.a.b should NOT be added as a unconditional dependency to the reactive
// scope that produces x if it is not accessed in every path

import {identity} from 'shared-runtime';

function useCondDepInSwitchMissingCase(props, other) {
  const x = {};
  switch (identity(other)) {
    case 1:
      x.a = props.a.b;
      break;
    case 2:
      x.b = 42;
      break;
    default:
      x.c = props.a.b;
      break;
  }
  return x;
}

export const FIXTURE_ENTRYPOINT = {
  fn: useCondDepInSwitchMissingCase,
  params: [{a: {b: 2}}, 2],
};

Subdomains

Dependencies

  • shared-runtime

Frequently Asked Questions

What does cfg-switch-missing-case.js do?
cfg-switch-missing-case.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 cfg-switch-missing-case.js?
cfg-switch-missing-case.js defines 1 function(s): useCondDepInSwitchMissingCase.
What does cfg-switch-missing-case.js depend on?
cfg-switch-missing-case.js imports 1 module(s): shared-runtime.
Where is cfg-switch-missing-case.js in the architecture?
cfg-switch-missing-case.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/reduce-reactive-deps/cfg-switch-missing-case.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