useMemo-dep-array-literal-access.ts — react Source File
Architecture documentation for useMemo-dep-array-literal-access.ts, a typescript file in the react codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR fe7b4c47_f57b_96a0_7fc3_0fcda2f504bf["useMemo-dep-array-literal-access.ts"] ac587885_e294_a1e9_b13f_5e7b920fdb42["react"] fe7b4c47_f57b_96a0_7fc3_0fcda2f504bf --> ac587885_e294_a1e9_b13f_5e7b920fdb42 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"] fe7b4c47_f57b_96a0_7fc3_0fcda2f504bf --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05 style fe7b4c47_f57b_96a0_7fc3_0fcda2f504bf fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
// @validatePreserveExistingMemoizationGuarantees @validateExhaustiveMemoizationDependencies:false
import {useMemo} from 'react';
import {makeArray} from 'shared-runtime';
// We currently only recognize "hoistable" values (e.g. variable reads
// and property loads from named variables) in the source depslist.
// This makes validation logic simpler and follows the same constraints
// from the eslint react-hooks-deps plugin.
function Foo(props) {
const x = makeArray(props);
// react-hooks-deps lint would already fail here
return useMemo(() => [x[0]], [x[0]]);
}
export const FIXTURE_ENTRYPOINT = {
fn: Foo,
params: [{val: 1}],
};
Domain
Subdomains
Functions
Dependencies
- react
- shared-runtime
Source
Frequently Asked Questions
What does useMemo-dep-array-literal-access.ts do?
useMemo-dep-array-literal-access.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-dep-array-literal-access.ts?
useMemo-dep-array-literal-access.ts defines 1 function(s): Foo.
What does useMemo-dep-array-literal-access.ts depend on?
useMemo-dep-array-literal-access.ts imports 2 module(s): react, shared-runtime.
Where is useMemo-dep-array-literal-access.ts in the architecture?
useMemo-dep-array-literal-access.ts is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/preserve-memo-validation/useMemo-dep-array-literal-access.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