Home / Class/ ErrorBoundary Class — react Architecture

ErrorBoundary Class — react Architecture

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

Entity Profile

Dependency Diagram

graph TD
  c763d47f_1235_b64d_2b92_97c8cb483424["ErrorBoundary"]
  da651484_5f55_0111_b32f_8124f5c087a3["ReactProfiler-test.internal.js"]
  c763d47f_1235_b64d_2b92_97c8cb483424 -->|defined in| da651484_5f55_0111_b32f_8124f5c087a3
  9e6ea1d5_8ea7_f709_0dba_be62ebbbef86["componentDidCatch()"]
  c763d47f_1235_b64d_2b92_97c8cb483424 -->|method| 9e6ea1d5_8ea7_f709_0dba_be62ebbbef86
  136f4869_613d_c64a_b127_459043f5775c["render()"]
  c763d47f_1235_b64d_2b92_97c8cb483424 -->|method| 136f4869_613d_c64a_b127_459043f5775c
  45f5e9c6_6690_dada_2bfa_34db57c23ddb["getDerivedStateFromError()"]
  c763d47f_1235_b64d_2b92_97c8cb483424 -->|method| 45f5e9c6_6690_dada_2bfa_34db57c23ddb

Relationship Graph

Source Code

packages/react/src/__tests__/ReactProfiler-test.internal.js lines 1037–1050

      class ErrorBoundary extends React.Component {
        state = {error: null};
        componentDidCatch(error) {
          this.setState({error});
        }
        render() {
          Scheduler.unstable_advanceTime(2);
          return this.state.error === null ? (
            this.props.children
          ) : (
            <AdvanceTime byAmount={20} />
          );
        }
      }

Frequently Asked Questions

What is the ErrorBoundary class?
ErrorBoundary is a class in the react codebase, defined in packages/react/src/__tests__/ReactProfiler-test.internal.js.
Where is ErrorBoundary defined?
ErrorBoundary is defined in packages/react/src/__tests__/ReactProfiler-test.internal.js at line 1037.

Analyze Your Own Codebase

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

Try Supermodel Free