Component() — react Function Reference
Architecture documentation for the Component() function in jsx-tag-evaluation-order-non-global.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 25b48501_de76_bffa_bec1_d24f7a7fb485["Component()"] bfadef79_0d08_5f53_a098_8102bba16937["jsx-tag-evaluation-order-non-global.js"] 25b48501_de76_bffa_bec1_d24f7a7fb485 -->|defined in| bfadef79_0d08_5f53_a098_8102bba16937 f8414c59_a311_921a_269e_f3cbaf270fcf["MaybeMutable()"] 25b48501_de76_bffa_bec1_d24f7a7fb485 -->|calls| f8414c59_a311_921a_269e_f3cbaf270fcf 286eb289_5464_1c57_0b46_68054da46fee["maybeMutate()"] 25b48501_de76_bffa_bec1_d24f7a7fb485 -->|calls| 286eb289_5464_1c57_0b46_68054da46fee style 25b48501_de76_bffa_bec1_d24f7a7fb485 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/jsx-tag-evaluation-order-non-global.js lines 8–20
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>
);
}
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-tag-evaluation-order-non-global.js.
Where is Component() defined?
Component() is defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/jsx-tag-evaluation-order-non-global.js at line 8.
What does Component() call?
Component() calls 2 function(s): MaybeMutable, maybeMutate.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free