Home / File/ repro-cx-namespace-nesting.js — react Source File

repro-cx-namespace-nesting.js — react Source File

Architecture documentation for repro-cx-namespace-nesting.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
  9dee8ca0_01ed_c41f_daad_00965fb86c1a["repro-cx-namespace-nesting.js"]
  006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"]
  9dee8ca0_01ed_c41f_daad_00965fb86c1a --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05
  style 9dee8ca0_01ed_c41f_daad_00965fb86c1a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// @compilationMode:"infer"
import {makeArray} from 'shared-runtime';

function Component() {
  const items = makeArray('foo', 'bar', '', null, 'baz', false, 'merp');
  const classname = cx.namespace(...items.filter(isNonEmptyString));
  return <div className={classname}>Ok</div>;
}

function isNonEmptyString(s) {
  return typeof s === 'string' && s.trim().length !== 0;
}

const cx = {
  namespace(...items) {
    return items.join(' ');
  },
};

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

Subdomains

Dependencies

  • shared-runtime

Frequently Asked Questions

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