hydration.js — react Source File
Architecture documentation for hydration.js, a javascript file in the react codebase. 4 imports, 5 dependents.
Entity Profile
Dependency Diagram
graph LR 1c475223_c7f1_4358_0008_92ae679f42e4["hydration.js"] 627bb742_21aa_b4fd_fe2d_4a963a1f9278["utils"] 1c475223_c7f1_4358_0008_92ae679f42e4 --> 627bb742_21aa_b4fd_fe2d_4a963a1f9278 e1e1de60_2be4_0643_45fb_e2c306735427["ReactSymbols"] 1c475223_c7f1_4358_0008_92ae679f42e4 --> e1e1de60_2be4_0643_45fb_e2c306735427 aec7978f_0a19_ba93_de9e_ac8cf5ddc74b["types"] 1c475223_c7f1_4358_0008_92ae679f42e4 --> aec7978f_0a19_ba93_de9e_ac8cf5ddc74b 4321c04c_6e7b_409b_4c59_c09fbf7074a8["noop"] 1c475223_c7f1_4358_0008_92ae679f42e4 --> 4321c04c_6e7b_409b_4c59_c09fbf7074a8 5a9f89d7_52b7_04f5_ab3d_8ec03c9054e3["InspectedElementHooksTree.js"] 5a9f89d7_52b7_04f5_ab3d_8ec03c9054e3 --> 1c475223_c7f1_4358_0008_92ae679f42e4 72d570aa_3875_3688_0200_4617e04d04ed["InspectedElementSuspendedBy.js"] 72d570aa_3875_3688_0200_4617e04d04ed --> 1c475223_c7f1_4358_0008_92ae679f42e4 276bc34e_3008_101e_3cd7_cc895fcd3848["KeyValue.js"] 276bc34e_3008_101e_3cd7_cc895fcd3848 --> 1c475223_c7f1_4358_0008_92ae679f42e4 d7b27d30_728f_ba37_ed97_d371fbd3de62["utils.js"] d7b27d30_728f_ba37_ed97_d371fbd3de62 --> 1c475223_c7f1_4358_0008_92ae679f42e4 0de29888_ca49_eb3c_33f7_ab4fff46de0b["utils.js"] 0de29888_ca49_eb3c_33f7_ab4fff46de0b --> 1c475223_c7f1_4358_0008_92ae679f42e4 style 1c475223_c7f1_4358_0008_92ae679f42e4 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 {
getDataType,
getDisplayNameForReactElement,
getAllEnumerableKeys,
getInObject,
formatDataForPreview,
setInObject,
} from 'react-devtools-shared/src/utils';
import {REACT_LEGACY_ELEMENT_TYPE} from 'shared/ReactSymbols';
import type {
DehydratedData,
InspectedElementPath,
} from 'react-devtools-shared/src/frontend/types';
import noop from 'shared/noop';
export const meta = {
inspectable: (Symbol('inspectable'): symbol),
inspected: (Symbol('inspected'): symbol),
name: (Symbol('name'): symbol),
preview_long: (Symbol('preview_long'): symbol),
preview_short: (Symbol('preview_short'): symbol),
readonly: (Symbol('readonly'): symbol),
size: (Symbol('size'): symbol),
type: (Symbol('type'): symbol),
unserializable: (Symbol('unserializable'): symbol),
};
export type Dehydrated = {
inspectable: boolean,
name: string | null,
preview_long: string | null,
preview_short: string | null,
readonly?: boolean,
size?: number,
type: string,
};
// Typed arrays, other complex iteratable objects (e.g. Map, Set, ImmutableJS) or Promises need special handling.
// These objects can't be serialized without losing type information,
// so a "Unserializable" type wrapper is used (with meta-data keys) to send nested values-
// while preserving the original type and name.
export type Unserializable = {
name: string | null,
preview_long: string | null,
preview_short: string | null,
readonly?: boolean,
size?: number,
type: string,
// ... (748 more lines)
Domain
Dependencies
- ReactSymbols
- noop
- types
- utils
Imported By
- packages/react-devtools-shared/src/devtools/views/Components/InspectedElementHooksTree.js
- packages/react-devtools-shared/src/devtools/views/Components/InspectedElementSuspendedBy.js
- packages/react-devtools-shared/src/devtools/views/Components/KeyValue.js
- packages/react-devtools-shared/src/devtools/views/utils.js
- packages/react-devtools-shared/src/utils.js
Source
Frequently Asked Questions
What does hydration.js do?
hydration.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain.
What does hydration.js depend on?
hydration.js imports 4 module(s): ReactSymbols, noop, types, utils.
What files import hydration.js?
hydration.js is imported by 5 file(s): InspectedElementHooksTree.js, InspectedElementSuspendedBy.js, KeyValue.js, utils.js, utils.js.
Where is hydration.js in the architecture?
hydration.js is located at packages/react-devtools-shared/src/hydration.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