Component() — react Function Reference
Architecture documentation for the Component() function in global-jsx-tag-lowered-between-mutations.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 338305c0_c419_926c_4cc8_17f4b34552d1["Component()"] 63c205be_ff00_a6c5_312a_12af0d702570["global-jsx-tag-lowered-between-mutations.js"] 338305c0_c419_926c_4cc8_17f4b34552d1 -->|defined in| 63c205be_ff00_a6c5_312a_12af0d702570 style 338305c0_c419_926c_4cc8_17f4b34552d1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/global-jsx-tag-lowered-between-mutations.js lines 1–15
function Component(props) {
const maybeMutable = new MaybeMutable();
// NOTE: this will produce invalid output.
// The HIR is roughly:
// ⌵ mutable range of `maybeMutable`
// StoreLocal maybeMutable = ... ⌝
// t0 = LoadGlobal View ⎮ <-- View is lowered inside this mutable range
// and thus gets becomes an output of this scope,
// gets promoted to temporary
// t1 = LoadGlobal maybeMutate ⎮
// t2 = LoadLocal maybeMutable ⎮
// t3 = Call t1(t2) ⌟
// t4 = Jsx tag=t0 props=[] children=[t3] <-- `t0` is an invalid tag
return <View>{maybeMutate(maybeMutable)}</View>;
}
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/global-jsx-tag-lowered-between-mutations.js.
Where is Component() defined?
Component() is defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/global-jsx-tag-lowered-between-mutations.js at line 1.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free