Home / File/ ReactDebugHooks.js — react Source File

ReactDebugHooks.js — react Source File

Architecture documentation for ReactDebugHooks.js, a javascript file in the react codebase. 9 imports, 1 dependents.

File javascript BabelCompiler 9 imports 1 dependents

Entity Profile

Dependency Diagram

graph LR
  cf3066ba_94d4_4ef1_0447_0db6cddc7fda["ReactDebugHooks.js"]
  24a36b11_d722_13bc_2618_326e21791b68["error-stack-parser"]
  cf3066ba_94d4_4ef1_0447_0db6cddc7fda --> 24a36b11_d722_13bc_2618_326e21791b68
  d8f20c67_f5fa_0f0a_c967_c41fd9ffce07["ReactTypes"]
  cf3066ba_94d4_4ef1_0447_0db6cddc7fda --> d8f20c67_f5fa_0f0a_c967_c41fd9ffce07
  42892443_e223_3da0_aeb9_e1b32a408fb0["ReactInternalTypes"]
  cf3066ba_94d4_4ef1_0447_0db6cddc7fda --> 42892443_e223_3da0_aeb9_e1b32a408fb0
  95ef6e30_5e15_fea2_4f8e_0f58a4f2ddaa["ReactFiberConfig"]
  cf3066ba_94d4_4ef1_0447_0db6cddc7fda --> 95ef6e30_5e15_fea2_4f8e_0f58a4f2ddaa
  326b1b33_c1be_450b_f53b_51a78bbe8633["assign"]
  cf3066ba_94d4_4ef1_0447_0db6cddc7fda --> 326b1b33_c1be_450b_f53b_51a78bbe8633
  1c5695a6_6806_ba54_2074_efc779e66da4["ReactSharedInternals"]
  cf3066ba_94d4_4ef1_0447_0db6cddc7fda --> 1c5695a6_6806_ba54_2074_efc779e66da4
  f8f61929_42ba_4030_bc4f_a1c5484f5f32["ReactWorkTags"]
  cf3066ba_94d4_4ef1_0447_0db6cddc7fda --> f8f61929_42ba_4030_bc4f_a1c5484f5f32
  e1e1de60_2be4_0643_45fb_e2c306735427["ReactSymbols"]
  cf3066ba_94d4_4ef1_0447_0db6cddc7fda --> e1e1de60_2be4_0643_45fb_e2c306735427
  a413acd5_7541_e904_f255_d4dd9b5e5bc1["hasOwnProperty"]
  cf3066ba_94d4_4ef1_0447_0db6cddc7fda --> a413acd5_7541_e904_f255_d4dd9b5e5bc1
  b4735f1a_aa65_2cba_e3bd_803f58fce600["ReactDebugTools.js"]
  b4735f1a_aa65_2cba_e3bd_803f58fce600 --> cf3066ba_94d4_4ef1_0447_0db6cddc7fda
  style cf3066ba_94d4_4ef1_0447_0db6cddc7fda fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow
 */
import type {StackFrame as ParsedStackFrame} from 'error-stack-parser';
import type {
  Awaited,
  ReactContext,
  StartTransitionOptions,
  Usable,
  Thenable,
  ReactDebugInfo,
} from 'shared/ReactTypes';
import type {
  ContextDependency,
  Dependencies,
  Fiber,
  Dispatcher as DispatcherType,
} from 'react-reconciler/src/ReactInternalTypes';
import type {TransitionStatus} from 'react-reconciler/src/ReactFiberConfig';

import ErrorStackParser from 'error-stack-parser';
import assign from 'shared/assign';
import ReactSharedInternals from 'shared/ReactSharedInternals';
import {
  FunctionComponent,
  SimpleMemoComponent,
  ContextProvider,
  ForwardRef,
} from 'react-reconciler/src/ReactWorkTags';
import {
  REACT_MEMO_CACHE_SENTINEL,
  REACT_CONTEXT_TYPE,
} from 'shared/ReactSymbols';
import hasOwnProperty from 'shared/hasOwnProperty';

type CurrentDispatcherRef = typeof ReactSharedInternals;

// Used to track hooks called during a render

type HookLogEntry = {
  displayName: string | null,
  primitive: string,
  stackError: Error,
  value: mixed,
  debugInfo: ReactDebugInfo | null,
  dispatcherHookName: string,
};

let hookLog: Array<HookLogEntry> = [];

// Primitives

type BasicStateAction<S> = (S => S) | S;

type Dispatch<A> = A => void;
// ... (1335 more lines)

Domain

Dependencies

  • ReactFiberConfig
  • ReactInternalTypes
  • ReactSharedInternals
  • ReactSymbols
  • ReactTypes
  • ReactWorkTags
  • assign
  • error-stack-parser
  • hasOwnProperty

Frequently Asked Questions

What does ReactDebugHooks.js do?
ReactDebugHooks.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain.
What does ReactDebugHooks.js depend on?
ReactDebugHooks.js imports 9 module(s): ReactFiberConfig, ReactInternalTypes, ReactSharedInternals, ReactSymbols, ReactTypes, ReactWorkTags, assign, error-stack-parser, and 1 more.
What files import ReactDebugHooks.js?
ReactDebugHooks.js is imported by 1 file(s): ReactDebugTools.js.
Where is ReactDebugHooks.js in the architecture?
ReactDebugHooks.js is located at packages/react-debug-tools/src/ReactDebugHooks.js (domain: BabelCompiler, directory: packages/react-debug-tools/src).

Analyze Your Own Codebase

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

Try Supermodel Free