Home / File/ immutable-hooks.js — react Source File

immutable-hooks.js — react Source File

Architecture documentation for immutable-hooks.js, a javascript file in the react codebase.

Entity Profile

Relationship Graph

Source Code

// @enableAssumeHooksFollowRulesOfReact true
function Component(props) {
  const x = {};
  // In enableAssumeHooksFollowRulesOfReact mode hooks freeze their inputs and return frozen values
  const y = useFoo(x);
  // Thus both x and y are frozen here, and x can be independently memoized
  bar(x, y);
  return [x, y];
}

Subdomains

Functions

Frequently Asked Questions

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