useCallback-reordering-deplist-controlflow.tsx — react Source File
Architecture documentation for useCallback-reordering-deplist-controlflow.tsx, a tsx file in the react codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 9718f58d_625e_e369_1175_36ab2f6cc279["useCallback-reordering-deplist-controlflow.tsx"] ac587885_e294_a1e9_b13f_5e7b920fdb42["react"] 9718f58d_625e_e369_1175_36ab2f6cc279 --> ac587885_e294_a1e9_b13f_5e7b920fdb42 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"] 9718f58d_625e_e369_1175_36ab2f6cc279 --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05 style 9718f58d_625e_e369_1175_36ab2f6cc279 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
// @enableNewMutationAliasingModel @enablePreserveExistingMemoizationGuarantees:false @validateExhaustiveMemoizationDependencies:false
import {useCallback} from 'react';
import {Stringify} from 'shared-runtime';
function Foo({arr1, arr2, foo}) {
const x = [arr1];
let y = [];
const getVal1 = useCallback(() => {
return {x: 2};
}, []);
const getVal2 = useCallback(() => {
return [y];
}, [foo ? (y = x.concat(arr2)) : y]);
return <Stringify val1={getVal1} val2={getVal2} shouldInvokeFns={true} />;
}
export const FIXTURE_ENTRYPOINT = {
fn: Foo,
params: [{arr1: [1, 2], arr2: [3, 4], foo: true}],
sequentialRenders: [
{arr1: [1, 2], arr2: [3, 4], foo: true},
{arr1: [1, 2], arr2: [3, 4], foo: false},
],
};
Domain
Subdomains
Functions
Dependencies
- react
- shared-runtime
Source
Frequently Asked Questions
What does useCallback-reordering-deplist-controlflow.tsx do?
useCallback-reordering-deplist-controlflow.tsx is a source file in the react codebase, written in tsx. It belongs to the TestingUtilities domain, Fixtures subdomain.
What functions are defined in useCallback-reordering-deplist-controlflow.tsx?
useCallback-reordering-deplist-controlflow.tsx defines 1 function(s): Foo.
What does useCallback-reordering-deplist-controlflow.tsx depend on?
useCallback-reordering-deplist-controlflow.tsx imports 2 module(s): react, shared-runtime.
Where is useCallback-reordering-deplist-controlflow.tsx in the architecture?
useCallback-reordering-deplist-controlflow.tsx is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/new-mutability/useCallback-reordering-deplist-controlflow.tsx (domain: TestingUtilities, subdomain: Fixtures, directory: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/new-mutability).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free