repro-useMemo-if-else-both-early-return.js — react Source File
Architecture documentation for repro-useMemo-if-else-both-early-return.js, a javascript file in the react codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR a46264fd_37e8_0b27_52fb_c5e056a345b4["repro-useMemo-if-else-both-early-return.js"] ac587885_e294_a1e9_b13f_5e7b920fdb42["react"] a46264fd_37e8_0b27_52fb_c5e056a345b4 --> ac587885_e294_a1e9_b13f_5e7b920fdb42 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"] a46264fd_37e8_0b27_52fb_c5e056a345b4 --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05 style a46264fd_37e8_0b27_52fb_c5e056a345b4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import {useMemo} from 'react';
import {
makeObject_Primitives,
mutate,
Stringify,
ValidateMemoization,
} from 'shared-runtime';
function Component({cond}) {
const memoized = useMemo(() => {
const value = makeObject_Primitives();
if (cond) {
return value;
} else {
mutate(value);
return value;
}
}, [cond]);
return <ValidateMemoization inputs={[cond]} output={memoized} />;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{cond: false}],
sequentialRenders: [
{cond: false},
{cond: false},
{cond: true},
{cond: true},
{cond: false},
{cond: true},
{cond: false},
{cond: true},
],
};
Domain
Subdomains
Functions
Dependencies
- react
- shared-runtime
Source
Frequently Asked Questions
What does repro-useMemo-if-else-both-early-return.js do?
repro-useMemo-if-else-both-early-return.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 repro-useMemo-if-else-both-early-return.js?
repro-useMemo-if-else-both-early-return.js defines 1 function(s): Component.
What does repro-useMemo-if-else-both-early-return.js depend on?
repro-useMemo-if-else-both-early-return.js imports 2 module(s): react, shared-runtime.
Where is repro-useMemo-if-else-both-early-return.js in the architecture?
repro-useMemo-if-else-both-early-return.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-useMemo-if-else-both-early-return.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