Home / File/ ReactSerializationErrors.js — react Source File

ReactSerializationErrors.js — react Source File

Architecture documentation for ReactSerializationErrors.js, a javascript file in the react codebase. 5 imports, 0 dependents.

File javascript BabelCompiler Entrypoint 5 imports 8 functions

Entity Profile

Dependency Diagram

graph LR
  07b21cf4_35fa_b825_b4d7_94b229a65c00["ReactSerializationErrors.js"]
  e1e1de60_2be4_0643_45fb_e2c306735427["ReactSymbols"]
  07b21cf4_35fa_b825_b4d7_94b229a65c00 --> e1e1de60_2be4_0643_45fb_e2c306735427
  ebbd7451_c238_0c5d_d01e_21d7c2d60653["ReactLazy"]
  07b21cf4_35fa_b825_b4d7_94b229a65c00 --> ebbd7451_c238_0c5d_d01e_21d7c2d60653
  af78c51d_c7cb_3bf4_550f_f3fcc48f4f34["isArray"]
  07b21cf4_35fa_b825_b4d7_94b229a65c00 --> af78c51d_c7cb_3bf4_550f_f3fcc48f4f34
  12b1040a_3a93_df40_9c68_e6293b207a7a["getPrototypeOf"]
  07b21cf4_35fa_b825_b4d7_94b229a65c00 --> 12b1040a_3a93_df40_9c68_e6293b207a7a
  8344de1b_978c_be0f_eebd_38ccc4962a93["ReactFeatureFlags"]
  07b21cf4_35fa_b825_b4d7_94b229a65c00 --> 8344de1b_978c_be0f_eebd_38ccc4962a93
  style 07b21cf4_35fa_b825_b4d7_94b229a65c00 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 {
  REACT_ELEMENT_TYPE,
  REACT_FORWARD_REF_TYPE,
  REACT_LAZY_TYPE,
  REACT_MEMO_TYPE,
  REACT_SUSPENSE_TYPE,
  REACT_SUSPENSE_LIST_TYPE,
  REACT_VIEW_TRANSITION_TYPE,
} from 'shared/ReactSymbols';

import type {LazyComponent} from 'react/src/ReactLazy';

import isArray from 'shared/isArray';
import getPrototypeOf from 'shared/getPrototypeOf';

import {enableViewTransition} from 'shared/ReactFeatureFlags';

// Used for DEV messages to keep track of which parent rendered some props,
// in case they error.
export const jsxPropsParents: WeakMap<any, any> = new WeakMap();
export const jsxChildrenParents: WeakMap<any, any> = new WeakMap();

function isObjectPrototype(object: any): boolean {
  if (!object) {
    return false;
  }
  const ObjectPrototype = Object.prototype;
  if (object === ObjectPrototype) {
    return true;
  }
  // It might be an object from a different Realm which is
  // still just a plain simple object.
  if (getPrototypeOf(object)) {
    return false;
  }
  const names = Object.getOwnPropertyNames(object);
  for (let i = 0; i < names.length; i++) {
    if (!(names[i] in ObjectPrototype)) {
      return false;
    }
  }
  return true;
}

export function isGetter(object: any, name: string): boolean {
  const ObjectPrototype = Object.prototype;
  if (object === ObjectPrototype || object === null) {
    return false;
  }
  const descriptor = Object.getOwnPropertyDescriptor(object, name);
  if (descriptor === undefined) {
// ... (262 more lines)

Domain

Subdomains

Dependencies

  • ReactFeatureFlags
  • ReactLazy
  • ReactSymbols
  • getPrototypeOf
  • isArray

Frequently Asked Questions

What does ReactSerializationErrors.js do?
ReactSerializationErrors.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Entrypoint subdomain.
What functions are defined in ReactSerializationErrors.js?
ReactSerializationErrors.js defines 8 function(s): describeClientReference, describeElementType, describeKeyForErrorMessage, describeValueForErrorMessage, isGetter, isObjectPrototype, isSimpleObject, objectName.
What does ReactSerializationErrors.js depend on?
ReactSerializationErrors.js imports 5 module(s): ReactFeatureFlags, ReactLazy, ReactSymbols, getPrototypeOf, isArray.
Where is ReactSerializationErrors.js in the architecture?
ReactSerializationErrors.js is located at packages/shared/ReactSerializationErrors.js (domain: BabelCompiler, subdomain: Entrypoint, directory: packages/shared).

Analyze Your Own Codebase

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

Try Supermodel Free