useCallback-in-other-reactive-block.ts — react Source File
Architecture documentation for useCallback-in-other-reactive-block.ts, a typescript file in the react codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 8aa75617_5591_a0b0_32f5_262c2eb639ba["useCallback-in-other-reactive-block.ts"] c745ba00_63aa_6e9b_0885_a745bade6cf7["react"] 8aa75617_5591_a0b0_32f5_262c2eb639ba --> c745ba00_63aa_6e9b_0885_a745bade6cf7 9b88626e_0355_91af_db84_89f44a65ebc6["shared-runtime"] 8aa75617_5591_a0b0_32f5_262c2eb639ba --> 9b88626e_0355_91af_db84_89f44a65ebc6 style 8aa75617_5591_a0b0_32f5_262c2eb639ba fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
// @validatePreserveExistingMemoizationGuarantees
import {useCallback, useState} from 'react';
import {arrayPush} from 'shared-runtime';
// useCallback-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 = useCallback(() => {
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 useCallback-in-other-reactive-block.ts do?
useCallback-in-other-reactive-block.ts is a source file in the react codebase, written in typescript. It belongs to the CompilerCore domain, BabelIntegration subdomain.
What functions are defined in useCallback-in-other-reactive-block.ts?
useCallback-in-other-reactive-block.ts defines 1 function(s): useFoo.
What does useCallback-in-other-reactive-block.ts depend on?
useCallback-in-other-reactive-block.ts imports 2 module(s): react, shared-runtime.
Where is useCallback-in-other-reactive-block.ts in the architecture?
useCallback-in-other-reactive-block.ts is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/preserve-memo-validation/useCallback-in-other-reactive-block.ts (domain: CompilerCore, subdomain: BabelIntegration, 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