Home / File/ ErrorBoundary.js — react Source File

ErrorBoundary.js — react Source File

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

File javascript BabelCompiler Entrypoint 1 imports 2 dependents 1 classes

Entity Profile

Dependency Diagram

graph LR
  a595a180_8a71_e4db_574e_528cf2694d32["ErrorBoundary.js"]
  ac587885_e294_a1e9_b13f_5e7b920fdb42["react"]
  a595a180_8a71_e4db_574e_528cf2694d32 --> ac587885_e294_a1e9_b13f_5e7b920fdb42
  3c19db13_4295_a35d_8429_d706204acf47["Button.js"]
  3c19db13_4295_a35d_8429_d706204acf47 --> a595a180_8a71_e4db_574e_528cf2694d32
  427ce39f_dbe6_0025_36a9_def9ad6283ce["Form.js"]
  427ce39f_dbe6_0025_36a9_def9ad6283ce --> a595a180_8a71_e4db_574e_528cf2694d32
  style a595a180_8a71_e4db_574e_528cf2694d32 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

'use client';

import * as React from 'react';

export default class ErrorBoundary extends React.Component {
  state = {error: null};
  static getDerivedStateFromError(error) {
    return {error};
  }
  render() {
    if (this.state.error) {
      return React.createElement(
        'div',
        {},
        'Caught an error: ' + this.state.error.message
      );
    }
    return this.props.children;
  }
}

Domain

Subdomains

Classes

Dependencies

  • react

Frequently Asked Questions

What does ErrorBoundary.js do?
ErrorBoundary.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Entrypoint subdomain.
What does ErrorBoundary.js depend on?
ErrorBoundary.js imports 1 module(s): react.
What files import ErrorBoundary.js?
ErrorBoundary.js is imported by 2 file(s): Button.js, Form.js.
Where is ErrorBoundary.js in the architecture?
ErrorBoundary.js is located at fixtures/flight-esm/src/ErrorBoundary.js (domain: BabelCompiler, subdomain: Entrypoint, directory: fixtures/flight-esm/src).

Analyze Your Own Codebase

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

Try Supermodel Free