Home / File/ useCallback-captures-reassigned-context.ts — react Source File

useCallback-captures-reassigned-context.ts — react Source File

Architecture documentation for useCallback-captures-reassigned-context.ts, a typescript file in the react codebase. 2 imports, 0 dependents.

File typescript TestingUtilities Fixtures 2 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  f91d453a_5fb8_e193_0af6_4e60425ccbc8["useCallback-captures-reassigned-context.ts"]
  ac587885_e294_a1e9_b13f_5e7b920fdb42["react"]
  f91d453a_5fb8_e193_0af6_4e60425ccbc8 --> ac587885_e294_a1e9_b13f_5e7b920fdb42
  006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"]
  f91d453a_5fb8_e193_0af6_4e60425ccbc8 --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05
  style f91d453a_5fb8_e193_0af6_4e60425ccbc8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// @validatePreserveExistingMemoizationGuarantees

import {useCallback} from 'react';
import {makeArray} from 'shared-runtime';

// This case is fine, as all reassignments happen before the useCallback
function Foo(props) {
  let x = [];
  x.push(props);
  x = makeArray();

  const cb = useCallback(() => [x], [x]);

  return cb;
}
export const FIXTURE_ENTRYPOINT = {
  fn: Foo,
  params: [{}],
};

Subdomains

Functions

Dependencies

  • react
  • shared-runtime

Frequently Asked Questions

What does useCallback-captures-reassigned-context.ts do?
useCallback-captures-reassigned-context.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 useCallback-captures-reassigned-context.ts?
useCallback-captures-reassigned-context.ts defines 1 function(s): Foo.
What does useCallback-captures-reassigned-context.ts depend on?
useCallback-captures-reassigned-context.ts imports 2 module(s): react, shared-runtime.
Where is useCallback-captures-reassigned-context.ts in the architecture?
useCallback-captures-reassigned-context.ts is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/preserve-memo-validation/useCallback-captures-reassigned-context.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