Home / File/ jsx-attribute-with-jsx-fragment-value.flow.js — react Source File

jsx-attribute-with-jsx-fragment-value.flow.js — react Source File

Architecture documentation for jsx-attribute-with-jsx-fragment-value.flow.js, a javascript file in the react codebase. 1 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  f9fbdbbc_ad85_c691_5977_c48fe35b5ea3["jsx-attribute-with-jsx-fragment-value.flow.js"]
  9b88626e_0355_91af_db84_89f44a65ebc6["shared-runtime"]
  f9fbdbbc_ad85_c691_5977_c48fe35b5ea3 --> 9b88626e_0355_91af_db84_89f44a65ebc6
  style f9fbdbbc_ad85_c691_5977_c48fe35b5ea3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// @flow
import {Stringify} from 'shared-runtime';

function Component({items}) {
  // Per the spec, <Foo value=<>{...}</> /> is valid.
  // But many tools don't allow fragments as jsx attribute values,
  // so we ensure not to emit them wrapped in an expression container
  return items.length > 0 ? (
    <Foo
      value={
        <>
          {items.map(item => (
            <Stringify key={item.id} item={item} />
          ))}
        </>
      }></Foo>
  ) : null;
}

function Foo({value}) {
  return <div>{value}</div>;
}

export const FIXTURE_ENTRYPOINT = {
  fn: Component,
  params: [{items: [{id: 1, name: 'One!'}]}],
};

Domain

Subdomains

Functions

Dependencies

  • shared-runtime

Frequently Asked Questions

What does jsx-attribute-with-jsx-fragment-value.flow.js do?
jsx-attribute-with-jsx-fragment-value.flow.js is a source file in the react codebase, written in javascript. It belongs to the CompilerCore domain, BabelIntegration subdomain.
What functions are defined in jsx-attribute-with-jsx-fragment-value.flow.js?
jsx-attribute-with-jsx-fragment-value.flow.js defines 2 function(s): Component, Foo.
What does jsx-attribute-with-jsx-fragment-value.flow.js depend on?
jsx-attribute-with-jsx-fragment-value.flow.js imports 1 module(s): shared-runtime.
Where is jsx-attribute-with-jsx-fragment-value.flow.js in the architecture?
jsx-attribute-with-jsx-fragment-value.flow.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/jsx-attribute-with-jsx-fragment-value.flow.js (domain: CompilerCore, subdomain: BabelIntegration, 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