Home / File/ hooks-freeze-possibly-mutable-arguments.js — react Source File

hooks-freeze-possibly-mutable-arguments.js — react Source File

Architecture documentation for hooks-freeze-possibly-mutable-arguments.js, a javascript file in the react codebase.

Entity Profile

Relationship Graph

Source Code

function Component(props) {
  const cond = props.cond;
  const x = props.x;
  let a;
  if (cond) {
    a = x;
  } else {
    a = [];
  }
  useFreeze(a); // should freeze, value *may* be mutable
  useFreeze(a); // should be readonly
  call(a); // should be readonly
  return a;
}

function useFreeze(x) {}
function call(x) {}

Subdomains

Frequently Asked Questions

What does hooks-freeze-possibly-mutable-arguments.js do?
hooks-freeze-possibly-mutable-arguments.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 hooks-freeze-possibly-mutable-arguments.js?
hooks-freeze-possibly-mutable-arguments.js defines 3 function(s): Component, call, useFreeze.
Where is hooks-freeze-possibly-mutable-arguments.js in the architecture?
hooks-freeze-possibly-mutable-arguments.js is located at compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/hooks-freeze-possibly-mutable-arguments.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