Component() — react Function Reference
Architecture documentation for the Component() function in phi-type-inference-array-push-consecutive-phis.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD f8f82014_7a5a_60a8_e753_d1d2c320107d["Component()"] cf751534_3456_7e84_0de7_86c9deb4af2d["phi-type-inference-array-push-consecutive-phis.js"] f8f82014_7a5a_60a8_e753_d1d2c320107d -->|defined in| cf751534_3456_7e84_0de7_86c9deb4af2d style f8f82014_7a5a_60a8_e753_d1d2c320107d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/phi-type-inference-array-push-consecutive-phis.js lines 4–23
function Component(props) {
const x = {};
let y;
if (props.cond) {
if (props.cond2) {
y = [props.value];
} else {
y = [props.value2];
}
} else {
y = [];
}
// This should be inferred as `<store> y` s.t. `x` can still
// be independently memoized. *But* this also must properly
// extend the mutable range of the array literals in the
// if/else branches
y.push(x);
return [x, y];
}
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/propagate-scope-deps-hir-fork/phi-type-inference-array-push-consecutive-phis.js.
Where is Component() defined?
Component() is defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/propagate-scope-deps-hir-fork/phi-type-inference-array-push-consecutive-phis.js at line 4.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free