Home / File/ jsx-tag-evaluation-order-non-global.js — react Source File

jsx-tag-evaluation-order-non-global.js — react Source File

Architecture documentation for jsx-tag-evaluation-order-non-global.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
  bfadef79_0d08_5f53_a098_8102bba16937["jsx-tag-evaluation-order-non-global.js"]
  006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"]
  bfadef79_0d08_5f53_a098_8102bba16937 --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05
  style bfadef79_0d08_5f53_a098_8102bba16937 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import {StaticText1, StaticText2} from 'shared-runtime';

function MaybeMutable() {
  return {};
}
function maybeMutate(x) {}

function Component(props) {
  const maybeMutable = new MaybeMutable();
  let Tag = props.component;
  // NOTE: the order of evaluation in the lowering is incorrect:
  // the jsx element's tag observes `Tag` after reassignment, but should observe
  // it before the reassignment.

  // Currently, Forget preserves jsx whitespace in the source text.
  // prettier-ignore
  return (
    <Tag>{((Tag = props.alternateComponent), maybeMutate(maybeMutable))}<Tag /></Tag>
  );
}

export const FIXTURE_ENTRYPOINT = {
  fn: Component,
  params: [{component: StaticText1, alternateComponent: StaticText2}],
  isComponent: true,
};

Subdomains

Dependencies

  • shared-runtime

Frequently Asked Questions

What does jsx-tag-evaluation-order-non-global.js do?
jsx-tag-evaluation-order-non-global.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 jsx-tag-evaluation-order-non-global.js?
jsx-tag-evaluation-order-non-global.js defines 3 function(s): Component, MaybeMutable, maybeMutate.
What does jsx-tag-evaluation-order-non-global.js depend on?
jsx-tag-evaluation-order-non-global.js imports 1 module(s): shared-runtime.
Where is jsx-tag-evaluation-order-non-global.js in the architecture?
jsx-tag-evaluation-order-non-global.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/jsx-tag-evaluation-order-non-global.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