Home / File/ hoisted-declaration-with-scope.tsx — react Source File

hoisted-declaration-with-scope.tsx — react Source File

Architecture documentation for hoisted-declaration-with-scope.tsx, a tsx file in the react codebase. 1 imports, 0 dependents.

File tsx TestingUtilities Fixtures 1 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  e08bb992_cfaa_f601_4b38_7beb0106d8c6["hoisted-declaration-with-scope.tsx"]
  006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"]
  e08bb992_cfaa_f601_4b38_7beb0106d8c6 --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05
  style e08bb992_cfaa_f601_4b38_7beb0106d8c6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import {StaticText1, Stringify, identity, useHook} from 'shared-runtime';

/**
 * `button` and `dispatcher` must end up in the same memo block. It would be
 * invalid for `button` to take a dependency on `dispatcher` as dispatcher
 * is created later.
 */
function useFoo({onClose}) {
  const button = StaticText1 ?? (
    <Stringify
      primary={{
        label: identity('label'),
        onPress: onClose,
      }}
      secondary={{
        onPress: () => {
          dispatcher.go('route2');
        },
      }}
    />
  );

  const dispatcher = useHook();

  return button;
}

export const FIXTURE_ENTRYPOINT = {
  fn: useFoo,
  params: [{onClose: identity()}],
};

Subdomains

Functions

Dependencies

  • shared-runtime

Frequently Asked Questions

What does hoisted-declaration-with-scope.tsx do?
hoisted-declaration-with-scope.tsx is a source file in the react codebase, written in tsx. It belongs to the TestingUtilities domain, Fixtures subdomain.
What functions are defined in hoisted-declaration-with-scope.tsx?
hoisted-declaration-with-scope.tsx defines 1 function(s): useFoo.
What does hoisted-declaration-with-scope.tsx depend on?
hoisted-declaration-with-scope.tsx imports 1 module(s): shared-runtime.
Where is hoisted-declaration-with-scope.tsx in the architecture?
hoisted-declaration-with-scope.tsx is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/hoisted-declaration-with-scope.tsx (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