Home / File/ ReactIs.js — react Source File

ReactIs.js — react Source File

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

File javascript BabelCompiler Validation 2 imports 14 functions

Entity Profile

Dependency Diagram

graph LR
  dfae0a13_bd8b_97d9_0260_bcccc6acd4f8["ReactIs.js"]
  e1e1de60_2be4_0643_45fb_e2c306735427["ReactSymbols"]
  dfae0a13_bd8b_97d9_0260_bcccc6acd4f8 --> e1e1de60_2be4_0643_45fb_e2c306735427
  8344de1b_978c_be0f_eebd_38ccc4962a93["ReactFeatureFlags"]
  dfae0a13_bd8b_97d9_0260_bcccc6acd4f8 --> 8344de1b_978c_be0f_eebd_38ccc4962a93
  style dfae0a13_bd8b_97d9_0260_bcccc6acd4f8 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
 */

'use strict';

import {
  REACT_CONTEXT_TYPE,
  REACT_ELEMENT_TYPE,
  REACT_FORWARD_REF_TYPE,
  REACT_FRAGMENT_TYPE,
  REACT_LAZY_TYPE,
  REACT_MEMO_TYPE,
  REACT_PORTAL_TYPE,
  REACT_PROFILER_TYPE,
  REACT_CONSUMER_TYPE,
  REACT_STRICT_MODE_TYPE,
  REACT_SUSPENSE_TYPE,
  REACT_SUSPENSE_LIST_TYPE,
  REACT_VIEW_TRANSITION_TYPE,
  REACT_SCOPE_TYPE,
  REACT_LEGACY_HIDDEN_TYPE,
  REACT_TRACING_MARKER_TYPE,
} from 'shared/ReactSymbols';

import {
  enableScopeAPI,
  enableTransitionTracing,
  enableLegacyHidden,
  enableViewTransition,
} from 'shared/ReactFeatureFlags';

const REACT_CLIENT_REFERENCE: symbol = Symbol.for('react.client.reference');

export function typeOf(object: any): mixed {
  if (typeof object === 'object' && object !== null) {
    const $$typeof = object.$$typeof;
    switch ($$typeof) {
      case REACT_ELEMENT_TYPE:
        const type = object.type;

        switch (type) {
          case REACT_FRAGMENT_TYPE:
          case REACT_PROFILER_TYPE:
          case REACT_STRICT_MODE_TYPE:
          case REACT_SUSPENSE_TYPE:
          case REACT_SUSPENSE_LIST_TYPE:
          case REACT_VIEW_TRANSITION_TYPE:
            return type;
          default:
            const $$typeofType = type && type.$$typeof;

            switch ($$typeofType) {
              case REACT_CONTEXT_TYPE:
              case REACT_FORWARD_REF_TYPE:
// ... (113 more lines)

Domain

Subdomains

Dependencies

  • ReactFeatureFlags
  • ReactSymbols

Frequently Asked Questions

What does ReactIs.js do?
ReactIs.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in ReactIs.js?
ReactIs.js defines 14 function(s): isContextConsumer, isContextProvider, isElement, isForwardRef, isFragment, isLazy, isMemo, isPortal, isProfiler, isStrictMode, and 4 more.
What does ReactIs.js depend on?
ReactIs.js imports 2 module(s): ReactFeatureFlags, ReactSymbols.
Where is ReactIs.js in the architecture?
ReactIs.js is located at packages/react-is/src/ReactIs.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-is/src).

Analyze Your Own Codebase

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

Try Supermodel Free