Home / Class/ ErrorBoundary Class — react Architecture

ErrorBoundary Class — react Architecture

Architecture documentation for the ErrorBoundary class in storeComponentFilters-test.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  9f56c448_0be1_549a_6e1b_e52ce48abd64["ErrorBoundary"]
  03df98bf_ce05_9755_cb7b_8df25e14920b["storeComponentFilters-test.js"]
  9f56c448_0be1_549a_6e1b_e52ce48abd64 -->|defined in| 03df98bf_ce05_9755_cb7b_8df25e14920b
  b967a924_5e36_6238_a808_cdd224d9a857["getDerivedStateFromError()"]
  9f56c448_0be1_549a_6e1b_e52ce48abd64 -->|method| b967a924_5e36_6238_a808_cdd224d9a857
  4cd02d20_bbb0_6ee2_9d69_c34e5fa0bce1["render()"]
  9f56c448_0be1_549a_6e1b_e52ce48abd64 -->|method| 4cd02d20_bbb0_6ee2_9d69_c34e5fa0bce1

Relationship Graph

Source Code

packages/react-devtools-shared/src/__tests__/storeComponentFilters-test.js lines 759–772

    class ErrorBoundary extends React.Component {
      state = {hasError: false};

      static getDerivedStateFromError() {
        return {hasError: true};
      }

      render() {
        if (this.state.hasError) {
          return <div key="did-error" />;
        }
        return this.props.children;
      }
    }

Domain

Frequently Asked Questions

What is the ErrorBoundary class?
ErrorBoundary is a class in the react codebase, defined in packages/react-devtools-shared/src/__tests__/storeComponentFilters-test.js.
Where is ErrorBoundary defined?
ErrorBoundary is defined in packages/react-devtools-shared/src/__tests__/storeComponentFilters-test.js at line 759.

Analyze Your Own Codebase

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

Try Supermodel Free