Home / File/ backend.js — react Source File

backend.js — react Source File

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

File javascript 9 imports

Entity Profile

Dependency Diagram

graph LR
  7a1b878b_d1a1_0646_68c0_501bea7b481d["backend.js"]
  7812cbae_0bd0_497c_0a05_31fe0a8d0fde["agent"]
  7a1b878b_d1a1_0646_68c0_501bea7b481d --> 7812cbae_0bd0_497c_0a05_31fe0a8d0fde
  4077b620_5c59_61c2_0910_273f565da757["bridge"]
  7a1b878b_d1a1_0646_68c0_501bea7b481d --> 4077b620_5c59_61c2_0910_273f565da757
  bdc0f51e_4952_e5a8_d3d8_502a65e31437["hook"]
  7a1b878b_d1a1_0646_68c0_501bea7b481d --> bdc0f51e_4952_e5a8_d3d8_502a65e31437
  bb23732c_ecb9_fba3_cd32_68ff2320751d["backend"]
  7a1b878b_d1a1_0646_68c0_501bea7b481d --> bb23732c_ecb9_fba3_cd32_68ff2320751d
  55d27179_f566_db64_927b_e95655abee00["constants"]
  7a1b878b_d1a1_0646_68c0_501bea7b481d --> 55d27179_f566_db64_927b_e95655abee00
  a0f3dac9_e573_4923_3098_4bb9e10f0e2d["setupNativeStyleEditor"]
  7a1b878b_d1a1_0646_68c0_501bea7b481d --> a0f3dac9_e573_4923_3098_4bb9e10f0e2d
  627bb742_21aa_b4fd_fe2d_4a963a1f9278["utils"]
  7a1b878b_d1a1_0646_68c0_501bea7b481d --> 627bb742_21aa_b4fd_fe2d_4a963a1f9278
  aec7978f_0a19_ba93_de9e_ac8cf5ddc74b["types"]
  7a1b878b_d1a1_0646_68c0_501bea7b481d --> aec7978f_0a19_ba93_de9e_ac8cf5ddc74b
  40bf6909_04ae_bfb6_965f_14cfe98b94de["types"]
  7a1b878b_d1a1_0646_68c0_501bea7b481d --> 40bf6909_04ae_bfb6_965f_14cfe98b94de
  style 7a1b878b_d1a1_0646_68c0_501bea7b481d 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 Agent from 'react-devtools-shared/src/backend/agent';
import Bridge from 'react-devtools-shared/src/bridge';
import {installHook} from 'react-devtools-shared/src/hook';
import {initBackend} from 'react-devtools-shared/src/backend';
import {__DEBUG__} from 'react-devtools-shared/src/constants';
import setupNativeStyleEditor from 'react-devtools-shared/src/backend/NativeStyleEditor/setupNativeStyleEditor';
import {
  getDefaultComponentFilters,
  getIsReloadAndProfileSupported,
} from 'react-devtools-shared/src/utils';

import type {BackendBridge} from 'react-devtools-shared/src/bridge';
import type {
  ComponentFilter,
  Wall,
} from 'react-devtools-shared/src/frontend/types';
import type {
  DevToolsHook,
  DevToolsHookSettings,
  ProfilingSettings,
} from 'react-devtools-shared/src/backend/types';
import type {ResolveNativeStyle} from 'react-devtools-shared/src/backend/NativeStyleEditor/setupNativeStyleEditor';

type ConnectOptions = {
  host?: string,
  nativeStyleEditorValidAttributes?: $ReadOnlyArray<string>,
  port?: number,
  useHttps?: boolean,
  resolveRNStyle?: ResolveNativeStyle,
  retryConnectionDelay?: number,
  isAppActive?: () => boolean,
  websocket?: ?WebSocket,
  onSettingsUpdated?: (settings: $ReadOnly<DevToolsHookSettings>) => void,
  isReloadAndProfileSupported?: boolean,
  isProfiling?: boolean,
  onReloadAndProfile?: (recordChangeDescriptions: boolean) => void,
  onReloadAndProfileFlagsReset?: () => void,
};

let savedComponentFilters: Array<ComponentFilter> =
  getDefaultComponentFilters();

function debug(methodName: string, ...args: Array<mixed>) {
  if (__DEBUG__) {
    console.log(
      `%c[core/backend] %c${methodName}`,
      'color: teal; font-weight: bold;',
      'font-weight: bold;',
      ...args,
    );
  }
// ... (358 more lines)

Dependencies

  • agent
  • backend
  • bridge
  • constants
  • hook
  • setupNativeStyleEditor
  • types
  • types
  • utils

Frequently Asked Questions

What does backend.js do?
backend.js is a source file in the react codebase, written in javascript.
What does backend.js depend on?
backend.js imports 9 module(s): agent, backend, bridge, constants, hook, setupNativeStyleEditor, types, types, and 1 more.
Where is backend.js in the architecture?
backend.js is located at packages/react-devtools-core/src/backend.js (directory: packages/react-devtools-core/src).

Analyze Your Own Codebase

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

Try Supermodel Free