phi-type-inference-array-push.js — react Source File
Architecture documentation for phi-type-inference-array-push.js, a javascript file in the react codebase.
Entity Profile
Relationship Graph
Source Code
function Component(props) {
const x = {};
let y;
if (props.cond) {
y = [props.value];
} 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];
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{cond: true, value: 42}],
sequentialRenders: [
{cond: true, value: 3.14},
{cond: false, value: 3.14},
{cond: true, value: 42},
],
};
Domain
Subdomains
Functions
Source
Frequently Asked Questions
What does phi-type-inference-array-push.js do?
phi-type-inference-array-push.js is a source file in the react codebase, written in javascript. It belongs to the TestingUtilities domain, Fixtures subdomain.
What functions are defined in phi-type-inference-array-push.js?
phi-type-inference-array-push.js defines 1 function(s): Component.
Where is phi-type-inference-array-push.js in the architecture?
phi-type-inference-array-push.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/phi-type-inference-array-push.js (domain: TestingUtilities, subdomain: Fixtures, directory: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free