Home / File/ useCallback-call-second-function-which-captures-maybe-mutable-value-dont-preserve-memoization.js — react Source File

useCallback-call-second-function-which-captures-maybe-mutable-value-dont-preserve-memoization.js — react Source File

Architecture documentation for useCallback-call-second-function-which-captures-maybe-mutable-value-dont-preserve-memoization.js, a javascript file in the react codebase. 2 imports, 0 dependents.

File javascript TestingUtilities Fixtures 2 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  be1675f5_ba7f_5a70_709d_62384461fad3["useCallback-call-second-function-which-captures-maybe-mutable-value-dont-preserve-memoization.js"]
  ac587885_e294_a1e9_b13f_5e7b920fdb42["react"]
  be1675f5_ba7f_5a70_709d_62384461fad3 --> ac587885_e294_a1e9_b13f_5e7b920fdb42
  006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"]
  be1675f5_ba7f_5a70_709d_62384461fad3 --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05
  style be1675f5_ba7f_5a70_709d_62384461fad3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// @enablePreserveExistingMemoizationGuarantees:false @enableTransitivelyFreezeFunctionExpressions:false
import {useCallback} from 'react';
import {
  identity,
  logValue,
  makeObject_Primitives,
  useHook,
} from 'shared-runtime';

function Component(props) {
  const object = makeObject_Primitives();

  useHook();

  const log = () => {
    logValue(object);
  };

  const onClick = useCallback(() => {
    log();
  }, [log]);

  identity(object);

  return <div onClick={onClick} />;
}

export const FIXTURE_ENTRYPOINT = {
  fn: Component,
  params: [{}],
};

Subdomains

Functions

Dependencies

  • react
  • shared-runtime

Frequently Asked Questions

What does useCallback-call-second-function-which-captures-maybe-mutable-value-dont-preserve-memoization.js do?
useCallback-call-second-function-which-captures-maybe-mutable-value-dont-preserve-memoization.js is a source file in the react codebase, written in javascript. It belongs to the TestingUtilities domain, Fixtures subdomain.
What functions are defined in useCallback-call-second-function-which-captures-maybe-mutable-value-dont-preserve-memoization.js?
useCallback-call-second-function-which-captures-maybe-mutable-value-dont-preserve-memoization.js defines 1 function(s): Component.
What does useCallback-call-second-function-which-captures-maybe-mutable-value-dont-preserve-memoization.js depend on?
useCallback-call-second-function-which-captures-maybe-mutable-value-dont-preserve-memoization.js imports 2 module(s): react, shared-runtime.
Where is useCallback-call-second-function-which-captures-maybe-mutable-value-dont-preserve-memoization.js in the architecture?
useCallback-call-second-function-which-captures-maybe-mutable-value-dont-preserve-memoization.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/useCallback-call-second-function-which-captures-maybe-mutable-value-dont-preserve-memoization.js (domain: TestingUtilities, subdomain: Fixtures, directory: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free