Home / Function/ Foo() — react Function Reference

Foo() — react Function Reference

Architecture documentation for the Foo() function in repro-for-in-in-try.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  e6beff33_289f_875e_8e9e_e6bccfacbc25["Foo()"]
  5a618c40_2d0b_1ff3_31c2_818a32f8e440["repro-for-in-in-try.js"]
  e6beff33_289f_875e_8e9e_e6bccfacbc25 -->|defined in| 5a618c40_2d0b_1ff3_31c2_818a32f8e440
  style e6beff33_289f_875e_8e9e_e6bccfacbc25 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-for-in-in-try.js lines 1–11

function Foo({obj}) {
  const keys = [];
  try {
    for (const key in obj) {
      keys.push(key);
    }
  } catch (e) {
    return <span>Error</span>;
  }
  return <span>{keys.join(', ')}</span>;
}

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/repro-for-in-in-try.js.
Where is Foo() defined?
Foo() is defined in compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-for-in-in-try.js at line 1.

Analyze Your Own Codebase

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

Try Supermodel Free