Home / File/ CaughtErrorView.js — react Source File

CaughtErrorView.js — react Source File

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

File javascript BabelCompiler Validation 2 imports 1 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  10285ec0_0181_bae4_56b2_04d7b1305779["CaughtErrorView.js"]
  0472dbde_b52b_1be3_6e72_8d4482dc85ee["shared.css"]
  10285ec0_0181_bae4_56b2_04d7b1305779 --> 0472dbde_b52b_1be3_6e72_8d4482dc85ee
  ac587885_e294_a1e9_b13f_5e7b920fdb42["react"]
  10285ec0_0181_bae4_56b2_04d7b1305779 --> ac587885_e294_a1e9_b13f_5e7b920fdb42
  5ae46b4f_0f17_18a6_3def_6dc95832bf63["ErrorBoundary.js"]
  5ae46b4f_0f17_18a6_3def_6dc95832bf63 --> 10285ec0_0181_bae4_56b2_04d7b1305779
  style 10285ec0_0181_bae4_56b2_04d7b1305779 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 * as React from 'react';
import styles from './shared.css';

type Props = {
  callStack: string | null,
  children: React$Node,
  info: React$Node | null,
  componentStack: string | null,
  errorMessage: string,
};

export default function CaughtErrorView({
  callStack,
  children,
  info,
  componentStack,
  errorMessage,
}: Props): React.Node {
  return (
    <div className={styles.ErrorBoundary}>
      {children}
      <div className={styles.ErrorInfo}>
        <div className={styles.HeaderRow}>
          <div className={styles.ErrorHeader}>{errorMessage}</div>
        </div>
        {!!info && <div className={styles.InfoBox}>{info}</div>}
        {!!callStack && (
          <div className={styles.ErrorStack}>
            The error was thrown {callStack.trim()}
          </div>
        )}
      </div>
    </div>
  );
}

Domain

Subdomains

Functions

Dependencies

Frequently Asked Questions

What does CaughtErrorView.js do?
CaughtErrorView.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 CaughtErrorView.js?
CaughtErrorView.js defines 1 function(s): CaughtErrorView.
What does CaughtErrorView.js depend on?
CaughtErrorView.js imports 2 module(s): react, shared.css.
What files import CaughtErrorView.js?
CaughtErrorView.js is imported by 1 file(s): ErrorBoundary.js.
Where is CaughtErrorView.js in the architecture?
CaughtErrorView.js is located at packages/react-devtools-shared/src/devtools/views/ErrorBoundary/CaughtErrorView.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-devtools-shared/src/devtools/views/ErrorBoundary).

Analyze Your Own Codebase

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

Try Supermodel Free