Home / File/ memoize-primitive-function-calls.js — react Source File

memoize-primitive-function-calls.js — react Source File

Architecture documentation for memoize-primitive-function-calls.js, a javascript file in the react codebase. 2 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  afd0880f_66ef_549e_ac76_0ef1b5eff83f["memoize-primitive-function-calls.js"]
  c745ba00_63aa_6e9b_0885_a745bade6cf7["react"]
  afd0880f_66ef_549e_ac76_0ef1b5eff83f --> c745ba00_63aa_6e9b_0885_a745bade6cf7
  9b88626e_0355_91af_db84_89f44a65ebc6["shared-runtime"]
  afd0880f_66ef_549e_ac76_0ef1b5eff83f --> 9b88626e_0355_91af_db84_89f44a65ebc6
  style afd0880f_66ef_549e_ac76_0ef1b5eff83f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// @compilationMode:"infer" @enablePreserveExistingMemoizationGuarantees @validatePreserveExistingMemoizationGuarantees
import {useMemo} from 'react';
import {makeObject_Primitives, ValidateMemoization} from 'shared-runtime';

function Component(props) {
  const result = useMemo(() => {
    return makeObject(props.value).value + 1;
  }, [props.value]);
  return <ValidateMemoization inputs={[props.value]} output={result} />;
}

function makeObject(value) {
  console.log(value);
  return {value};
}

export const FIXTURE_ENTRYPOINT = {
  fn: Component,
  params: [{value: 42}],
  sequentialRenders: [
    {value: 42},
    {value: 42},
    {value: 3.14},
    {value: 3.14},
    {value: 42},
    {value: 3.14},
    {value: 42},
    {value: 3.14},
  ],
};

Domain

Subdomains

Dependencies

  • react
  • shared-runtime

Frequently Asked Questions

What does memoize-primitive-function-calls.js do?
memoize-primitive-function-calls.js is a source file in the react codebase, written in javascript. It belongs to the CompilerCore domain, BabelIntegration subdomain.
What functions are defined in memoize-primitive-function-calls.js?
memoize-primitive-function-calls.js defines 2 function(s): Component, makeObject.
What does memoize-primitive-function-calls.js depend on?
memoize-primitive-function-calls.js imports 2 module(s): react, shared-runtime.
Where is memoize-primitive-function-calls.js in the architecture?
memoize-primitive-function-calls.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/memoize-primitive-function-calls.js (domain: CompilerCore, subdomain: BabelIntegration, 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