Home / Function/ useCondDepInSwitch() — react Function Reference

useCondDepInSwitch() — react Function Reference

Architecture documentation for the useCondDepInSwitch() function in cfg-switch-exhaustive.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  3cd5b15d_62e6_937e_d610_fed851c87017["useCondDepInSwitch()"]
  64039950_b86c_3058_a4f1_82c78a5dddef["cfg-switch-exhaustive.js"]
  3cd5b15d_62e6_937e_d610_fed851c87017 -->|defined in| 64039950_b86c_3058_a4f1_82c78a5dddef
  style 3cd5b15d_62e6_937e_d610_fed851c87017 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/reduce-reactive-deps/cfg-switch-exhaustive.js lines 7–20

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

Domain

Subdomains

Frequently Asked Questions

What does useCondDepInSwitch() do?
useCondDepInSwitch() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/reduce-reactive-deps/cfg-switch-exhaustive.js.
Where is useCondDepInSwitch() defined?
useCondDepInSwitch() is defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/reduce-reactive-deps/cfg-switch-exhaustive.js at line 7.

Analyze Your Own Codebase

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

Try Supermodel Free