Home / Function/ Foo() — react Function Reference

Foo() — react Function Reference

Architecture documentation for the Foo() function in error.hook-call-freezes-captured-identifier.tsx from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  734f112a_3204_5b4e_3c8b_512715179d13["Foo()"]
  2bcaa62c_3d59_3e28_7cd5_808992bfb343["error.hook-call-freezes-captured-identifier.tsx"]
  734f112a_3204_5b4e_3c8b_512715179d13 -->|defined in| 2bcaa62c_3d59_3e28_7cd5_808992bfb343
  style 734f112a_3204_5b4e_3c8b_512715179d13 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.hook-call-freezes-captured-identifier.tsx lines 4–15

function Foo({count}) {
  const x = {value: 0};
  /**
   * After this custom hook call, it's no longer valid to mutate x.
   */
  const cb = useIdentity(() => {
    setPropertyByKey(x, 'value', count);
  });

  x.value += count;
  return <Stringify x={x} cb={cb} />;
}

Subdomains

Frequently Asked Questions

What does Foo() do?
Foo() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.hook-call-freezes-captured-identifier.tsx.
Where is Foo() defined?
Foo() is defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.hook-call-freezes-captured-identifier.tsx at line 4.

Analyze Your Own Codebase

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

Try Supermodel Free