Home / File/ utils.js — react Source File

utils.js — react Source File

Architecture documentation for utils.js, a javascript file in the react codebase. 10 imports, 6 dependents.

File javascript BabelCompiler 10 imports 6 dependents

Entity Profile

Dependency Diagram

graph LR
  0de29888_ca49_eb3c_33f7_ab4fff46de0b["utils.js"]
  bcb71f5e_1ecf_5620_9a9e_55d6ab61dd1f["constants.js"]
  0de29888_ca49_eb3c_33f7_ab4fff46de0b --> bcb71f5e_1ecf_5620_9a9e_55d6ab61dd1f
  501f1668_e338_41a4_686c_5b2aee4863b8["types.js"]
  0de29888_ca49_eb3c_33f7_ab4fff46de0b --> 501f1668_e338_41a4_686c_5b2aee4863b8
  1c475223_c7f1_4358_0008_92ae679f42e4["hydration.js"]
  0de29888_ca49_eb3c_33f7_ab4fff46de0b --> 1c475223_c7f1_4358_0008_92ae679f42e4
  898a6118_67ac_cea6_f919_2a9bd76ec637["isArray.js"]
  0de29888_ca49_eb3c_33f7_ab4fff46de0b --> 898a6118_67ac_cea6_f919_2a9bd76ec637
  9487a7c4_3e86_9e27_9d66_67935d8470b6["index.js"]
  0de29888_ca49_eb3c_33f7_ab4fff46de0b --> 9487a7c4_3e86_9e27_9d66_67935d8470b6
  a6a22523_be38_c543_6be0_5e0a78f4bcce["lru-cache"]
  0de29888_ca49_eb3c_33f7_ab4fff46de0b --> a6a22523_be38_c543_6be0_5e0a78f4bcce
  e1e1de60_2be4_0643_45fb_e2c306735427["ReactSymbols"]
  0de29888_ca49_eb3c_33f7_ab4fff46de0b --> e1e1de60_2be4_0643_45fb_e2c306735427
  aec7978f_0a19_ba93_de9e_ac8cf5ddc74b["types"]
  0de29888_ca49_eb3c_33f7_ab4fff46de0b --> aec7978f_0a19_ba93_de9e_ac8cf5ddc74b
  4f31ec17_ed00_bfa1_f25f_2101aa0548ee["storage"]
  0de29888_ca49_eb3c_33f7_ab4fff46de0b --> 4f31ec17_ed00_bfa1_f25f_2101aa0548ee
  40bf6909_04ae_bfb6_965f_14cfe98b94de["types"]
  0de29888_ca49_eb3c_33f7_ab4fff46de0b --> 40bf6909_04ae_bfb6_965f_14cfe98b94de
  27444ff2_8253_76db_da6c_4967b0d20cee["renderer.js"]
  27444ff2_8253_76db_da6c_4967b0d20cee --> 0de29888_ca49_eb3c_33f7_ab4fff46de0b
  bba85af0_a356_d0c5_4d12_914508b89593["store.js"]
  bba85af0_a356_d0c5_4d12_914508b89593 --> 0de29888_ca49_eb3c_33f7_ab4fff46de0b
  4c0d725a_27bd_a723_3599_a3e75bea5bd3["InspectedElement.js"]
  4c0d725a_27bd_a723_3599_a3e75bea5bd3 --> 0de29888_ca49_eb3c_33f7_ab4fff46de0b
  92c8d128_26b7_05c1_1f27_a9a5ab236fc6["useEditorURL.js"]
  92c8d128_26b7_05c1_1f27_a9a5ab236fc6 --> 0de29888_ca49_eb3c_33f7_ab4fff46de0b
  style 0de29888_ca49_eb3c_33f7_ab4fff46de0b 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 LRU from 'lru-cache';
import {
  REACT_CONSUMER_TYPE,
  REACT_CONTEXT_TYPE,
  REACT_FORWARD_REF_TYPE,
  REACT_FRAGMENT_TYPE,
  REACT_LAZY_TYPE,
  REACT_ELEMENT_TYPE,
  REACT_LEGACY_ELEMENT_TYPE,
  REACT_MEMO_TYPE,
  REACT_PORTAL_TYPE,
  REACT_PROFILER_TYPE,
  REACT_STRICT_MODE_TYPE,
  REACT_SUSPENSE_LIST_TYPE,
  REACT_SUSPENSE_TYPE,
  REACT_TRACING_MARKER_TYPE,
  REACT_VIEW_TRANSITION_TYPE,
} from 'shared/ReactSymbols';
import {
  TREE_OPERATION_ADD,
  TREE_OPERATION_REMOVE,
  TREE_OPERATION_REORDER_CHILDREN,
  TREE_OPERATION_SET_SUBTREE_MODE,
  TREE_OPERATION_UPDATE_ERRORS_OR_WARNINGS,
  TREE_OPERATION_UPDATE_TREE_BASE_DURATION,
  TREE_OPERATION_APPLIED_ACTIVITY_SLICE_CHANGE,
  LOCAL_STORAGE_COMPONENT_FILTER_PREFERENCES_KEY,
  LOCAL_STORAGE_OPEN_IN_EDITOR_URL,
  LOCAL_STORAGE_OPEN_IN_EDITOR_URL_PRESET,
  LOCAL_STORAGE_ALWAYS_OPEN_IN_EDITOR,
  SESSION_STORAGE_RELOAD_AND_PROFILE_KEY,
  SESSION_STORAGE_RECORD_CHANGE_DESCRIPTIONS_KEY,
  SESSION_STORAGE_RECORD_TIMELINE_KEY,
  SUSPENSE_TREE_OPERATION_ADD,
  SUSPENSE_TREE_OPERATION_REMOVE,
  SUSPENSE_TREE_OPERATION_REORDER_CHILDREN,
  SUSPENSE_TREE_OPERATION_RESIZE,
  SUSPENSE_TREE_OPERATION_SUSPENDERS,
} from './constants';
import {
  ComponentFilterActivitySlice,
  ComponentFilterElementType,
  ComponentFilterLocation,
  ElementTypeHostComponent,
} from './frontend/types';
import {
  ElementTypeRoot,
  ElementTypeClass,
  ElementTypeForwardRef,
  ElementTypeFunction,
  ElementTypeMemo,
// ... (1275 more lines)

Domain

Dependencies

Frequently Asked Questions

What does utils.js do?
utils.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain.
What does utils.js depend on?
utils.js imports 10 module(s): ReactSymbols, constants.js, hydration.js, index.js, isArray.js, lru-cache, storage, types, and 2 more.
What files import utils.js?
utils.js is imported by 6 file(s): InspectedElement.js, renderer.js, store.js, useEditorURL.js, useOpenResource.js, utils.js.
Where is utils.js in the architecture?
utils.js is located at packages/react-devtools-shared/src/utils.js (domain: BabelCompiler, directory: packages/react-devtools-shared/src).

Analyze Your Own Codebase

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

Try Supermodel Free