Home / File/ repro-cx-namespace-assigned-to-temporary.js — react Source File

repro-cx-namespace-assigned-to-temporary.js — react Source File

Architecture documentation for repro-cx-namespace-assigned-to-temporary.js, a javascript file in the react codebase. 1 imports, 0 dependents.

File javascript TestingUtilities Fixtures 1 imports 3 functions

Entity Profile

Dependency Diagram

graph LR
  ebd79f91_747e_2442_6bb5_89d85f768a5c["repro-cx-namespace-assigned-to-temporary.js"]
  006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"]
  ebd79f91_747e_2442_6bb5_89d85f768a5c --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05
  style ebd79f91_747e_2442_6bb5_89d85f768a5c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// @compilationMode:"infer" @enableAssumeHooksFollowRulesOfReact:false @customMacros(cx)
import {identity} from 'shared-runtime';

const DARK = 'dark';

function Component() {
  const theme = useTheme();
  return (
    <div
      className={cx.foo({
        'styles/light': true,
        'styles/dark': identity([theme.getTheme()]),
      })}
    />
  );
}

const cx = {
  foo(obj) {
    const classes = [];
    for (const [key, value] of Object.entries(obj)) {
      if (value) {
        classes.push(key);
      }
    }
    return classes.join(' ');
  },
};

function useTheme() {
  return {
    getTheme() {
      return DARK;
    },
  };
}

export const FIXTURE_ENTRYPOINT = {
  fn: Component,
  params: [{}],
};

Subdomains

Dependencies

  • shared-runtime

Frequently Asked Questions

What does repro-cx-namespace-assigned-to-temporary.js do?
repro-cx-namespace-assigned-to-temporary.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 repro-cx-namespace-assigned-to-temporary.js?
repro-cx-namespace-assigned-to-temporary.js defines 3 function(s): Component, cx.foo, useTheme.
What does repro-cx-namespace-assigned-to-temporary.js depend on?
repro-cx-namespace-assigned-to-temporary.js imports 1 module(s): shared-runtime.
Where is repro-cx-namespace-assigned-to-temporary.js in the architecture?
repro-cx-namespace-assigned-to-temporary.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/meta-isms/repro-cx-namespace-assigned-to-temporary.js (domain: TestingUtilities, subdomain: Fixtures, directory: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/meta-isms).

Analyze Your Own Codebase

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

Try Supermodel Free