Home / File/ hoist-deps-diff-ssa-instance.tsx — react Source File

hoist-deps-diff-ssa-instance.tsx — react Source File

Architecture documentation for hoist-deps-diff-ssa-instance.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
  6335f0f1_4049_e83d_c2e6_f2d823928f5f["hoist-deps-diff-ssa-instance.tsx"]
  006eec3d_77a9_4a47_e6c1_a96d7a6c9c05["shared-runtime"]
  6335f0f1_4049_e83d_c2e6_f2d823928f5f --> 006eec3d_77a9_4a47_e6c1_a96d7a6c9c05
  style 6335f0f1_4049_e83d_c2e6_f2d823928f5f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import {makeObject_Primitives, setPropertyByKey} from 'shared-runtime';

function useFoo({value, cond}) {
  let x: any = makeObject_Primitives();
  if (cond) {
    setPropertyByKey(x, 'a', null);
  } else {
    setPropertyByKey(x, 'a', {b: 2});
  }

  /**
   * y should take a dependency on `x`, not `x.a.b` here
   */
  const y = [];
  if (!cond) {
    y.push(x.a.b);
  }

  x = makeObject_Primitives();
  setPropertyByKey(x, 'a', {b: value});

  return [y, x.a.b];
}

export const FIXTURE_ENTRYPOINT = {
  fn: useFoo,
  params: [{value: 3, cond: true}],
  sequentialRenders: [
    {value: 3, cond: true},
    {value: 3, cond: false},
  ],
};

Subdomains

Functions

Dependencies

  • shared-runtime

Frequently Asked Questions

What does hoist-deps-diff-ssa-instance.tsx do?
hoist-deps-diff-ssa-instance.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 hoist-deps-diff-ssa-instance.tsx?
hoist-deps-diff-ssa-instance.tsx defines 1 function(s): useFoo.
What does hoist-deps-diff-ssa-instance.tsx depend on?
hoist-deps-diff-ssa-instance.tsx imports 1 module(s): shared-runtime.
Where is hoist-deps-diff-ssa-instance.tsx in the architecture?
hoist-deps-diff-ssa-instance.tsx is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/reduce-reactive-deps/hoist-deps-diff-ssa-instance.tsx (domain: TestingUtilities, subdomain: Fixtures, directory: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/reduce-reactive-deps).

Analyze Your Own Codebase

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

Try Supermodel Free