useMemo-in-other-reactive-block.ts — react Source File
Architecture documentation for useMemo-in-other-reactive-block.ts, a typescript file in the react codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR dbbe7259_4e77_eef9_93bc_83117db8fb8a["useMemo-in-other-reactive-block.ts"] ac587885_e294_a1e9_b13f_5e7b920fdb42["react"] dbbe7259_4e77_eef9_93bc_83117db8fb8a --> ac587885_e294_a1e9_b13f_5e7b920fdb42 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"] dbbe7259_4e77_eef9_93bc_83117db8fb8a --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05 style dbbe7259_4e77_eef9_93bc_83117db8fb8a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
// @validatePreserveExistingMemoizationGuarantees
import {useMemo, useState} from 'react';
import {arrayPush} from 'shared-runtime';
// useMemo-produced values can exist in nested reactive blocks, as long
// as their reactive dependencies are a subset of depslist from source
function useFoo(minWidth, otherProp) {
const [width, setWidth] = useState(1);
const x = [];
const style = useMemo(() => {
return {
width: Math.max(minWidth, width),
};
}, [width, minWidth]);
arrayPush(x, otherProp);
return [style, x];
}
export const FIXTURE_ENTRYPOINT = {
fn: useFoo,
params: [2, 'other'],
};
Domain
Subdomains
Functions
Dependencies
- react
- shared-runtime
Source
Frequently Asked Questions
What does useMemo-in-other-reactive-block.ts do?
useMemo-in-other-reactive-block.ts is a source file in the react codebase, written in typescript. It belongs to the TestingUtilities domain, Fixtures subdomain.
What functions are defined in useMemo-in-other-reactive-block.ts?
useMemo-in-other-reactive-block.ts defines 1 function(s): useFoo.
What does useMemo-in-other-reactive-block.ts depend on?
useMemo-in-other-reactive-block.ts imports 2 module(s): react, shared-runtime.
Where is useMemo-in-other-reactive-block.ts in the architecture?
useMemo-in-other-reactive-block.ts is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/preserve-memo-validation/useMemo-in-other-reactive-block.ts (domain: TestingUtilities, subdomain: Fixtures, directory: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/preserve-memo-validation).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free