Home / File/ repro-mutable-range-extending-into-ternary.js — react Source File

repro-mutable-range-extending-into-ternary.js — react Source File

Architecture documentation for repro-mutable-range-extending-into-ternary.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
  df78f3e0_553b_c230_0ac0_1f6f3d75bef1["repro-mutable-range-extending-into-ternary.js"]
  ac587885_e294_a1e9_b13f_5e7b920fdb42["react"]
  df78f3e0_553b_c230_0ac0_1f6f3d75bef1 --> ac587885_e294_a1e9_b13f_5e7b920fdb42
  style df78f3e0_553b_c230_0ac0_1f6f3d75bef1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import {useState} from 'react';

function Component(props) {
  const items = props.items ? props.items.slice() : [];
  const [state] = useState('');
  return props.cond ? (
    <div>{state}</div>
  ) : (
    <div>
      {items.map(item => (
        <div key={item.id}>{item.name}</div>
      ))}
    </div>
  );
}

export const FIXTURE_ENTRYPOINT = {
  fn: Component,
  params: [{cond: false, items: [{id: 0, name: 'Alice'}]}],
  sequentialRenders: [
    {cond: false, items: [{id: 0, name: 'Alice'}]},
    {
      cond: false,
      items: [
        {id: 0, name: 'Alice'},
        {id: 1, name: 'Bob'},
      ],
    },
    {
      cond: true,
      items: [
        {id: 0, name: 'Alice'},
        {id: 1, name: 'Bob'},
      ],
    },
    {
      cond: false,
      items: [
        {id: 1, name: 'Bob'},
        {id: 2, name: 'Claire'},
      ],
    },
  ],
};

Subdomains

Functions

Dependencies

  • react

Frequently Asked Questions

What does repro-mutable-range-extending-into-ternary.js do?
repro-mutable-range-extending-into-ternary.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-mutable-range-extending-into-ternary.js?
repro-mutable-range-extending-into-ternary.js defines 1 function(s): Component.
What does repro-mutable-range-extending-into-ternary.js depend on?
repro-mutable-range-extending-into-ternary.js imports 1 module(s): react.
Where is repro-mutable-range-extending-into-ternary.js in the architecture?
repro-mutable-range-extending-into-ternary.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-mutable-range-extending-into-ternary.js (domain: TestingUtilities, subdomain: Fixtures, directory: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler).

Analyze Your Own Codebase

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

Try Supermodel Free