Component() — react Function Reference
Architecture documentation for the Component() function in repro-invalid-function-expression-effects-phi.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 3282ec33_fd96_23aa_c0b5_41d4b6c5a272["Component()"] 503f992b_acec_f7d4_97f1_5591562ec006["repro-invalid-function-expression-effects-phi.js"] 3282ec33_fd96_23aa_c0b5_41d4b6c5a272 -->|defined in| 503f992b_acec_f7d4_97f1_5591562ec006 style 3282ec33_fd96_23aa_c0b5_41d4b6c5a272 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/new-mutability/repro-invalid-function-expression-effects-phi.js lines 1–17
function Component({a, b}) {
const y = {a};
const x = {b};
const f = () => {
let z = null;
while (z == null) {
z = x;
}
// z is a phi with a backedge, and we don't realize it could be x,
// and therefore fail to record a Capture x <- y effect for this
// function expression
z.y = y;
};
f();
mutate(x);
return <div>{x}</div>;
}
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/new-mutability/repro-invalid-function-expression-effects-phi.js.
Where is Component() defined?
Component() is defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/new-mutability/repro-invalid-function-expression-effects-phi.js at line 1.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free