Component() — react Function Reference
Architecture documentation for the Component() function in jsx-attribute-with-jsx-fragment-value.flow.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD b720c578_8225_1d04_4a99_c9fea0682c0f["Component()"] 1f534152_9c90_558c_0422_194117c002c6["jsx-attribute-with-jsx-fragment-value.flow.js"] b720c578_8225_1d04_4a99_c9fea0682c0f -->|defined in| 1f534152_9c90_558c_0422_194117c002c6 style b720c578_8225_1d04_4a99_c9fea0682c0f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/jsx-attribute-with-jsx-fragment-value.flow.js lines 4–18
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;
}
Domain
Subdomains
Source
Frequently Asked Questions
What does Component() do?
Component() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/jsx-attribute-with-jsx-fragment-value.flow.js.
Where is Component() defined?
Component() is defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/jsx-attribute-with-jsx-fragment-value.flow.js at line 4.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free