escape-analysis-non-escaping-interleaved-primitive-dependency.js — react Source File
Architecture documentation for escape-analysis-non-escaping-interleaved-primitive-dependency.js, a javascript file in the react codebase.
Entity Profile
Relationship Graph
Source Code
function Component(props) {
// a does not need to be memoized ever, even though it's a
// dependency of c, which exists in a scope that has a memoized
// output. it doesn't need to be memoized bc the value is a primitive type.
const a = props.a + props.b;
// b and c are interleaved and grouped into a single scope,
// but they are independent values. c does not escape, but
// we need to ensure that a is memoized or else b will invalidate
// on every render since a is a dependency.
const b = [];
const c = {};
c.a = a;
b.push(props.c);
return b;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: ['TodoAdd'],
isComponent: 'TodoAdd',
};
Domain
Subdomains
Functions
Source
Frequently Asked Questions
What does escape-analysis-non-escaping-interleaved-primitive-dependency.js do?
escape-analysis-non-escaping-interleaved-primitive-dependency.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 escape-analysis-non-escaping-interleaved-primitive-dependency.js?
escape-analysis-non-escaping-interleaved-primitive-dependency.js defines 1 function(s): Component.
Where is escape-analysis-non-escaping-interleaved-primitive-dependency.js in the architecture?
escape-analysis-non-escaping-interleaved-primitive-dependency.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/escape-analysis-non-escaping-interleaved-primitive-dependency.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