Home / File/ nested-function-shadowed-identifiers.js — react Source File

nested-function-shadowed-identifiers.js — react Source File

Architecture documentation for nested-function-shadowed-identifiers.js, a javascript file in the react codebase.

Entity Profile

Relationship Graph

Source Code

function Component(props) {
  const [x, setX] = useState(null);

  const onChange = e => {
    let x = null; // intentionally shadow the original x
    setX(currentX => currentX + x); // intentionally refer to shadowed x
  };

  return <input value={x} onChange={onChange} />;
}

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

Subdomains

Functions

Frequently Asked Questions

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