Home / File/ repro-for-of-in-try.js — react Source File

repro-for-of-in-try.js — react Source File

Architecture documentation for repro-for-of-in-try.js, a javascript file in the react codebase.

Entity Profile

Relationship Graph

Source Code

function Foo({obj}) {
  const items = [];
  try {
    for (const [key, value] of Object.entries(obj)) {
      items.push(`${key}: ${value}`);
    }
  } catch (e) {
    return <span>Error</span>;
  }
  return <span>{items.join(', ')}</span>;
}

export const FIXTURE_ENTRYPOINT = {
  fn: Foo,
  params: [{obj: {a: 1, b: 2}}],
  sequentialRenders: [
    {obj: {a: 1, b: 2}},
    {obj: {a: 1, b: 2}},
    {obj: {x: 'hello', y: 'world'}},
    {obj: {}},
    {obj: {single: 'value'}},
  ],
};

Subdomains

Functions

Frequently Asked Questions

What does repro-for-of-in-try.js do?
repro-for-of-in-try.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 repro-for-of-in-try.js?
repro-for-of-in-try.js defines 1 function(s): Foo.
Where is repro-for-of-in-try.js in the architecture?
repro-for-of-in-try.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-for-of-in-try.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