Home / Class/ Boundary Class — react Architecture

Boundary Class — react Architecture

Architecture documentation for the Boundary class in ReactHooks-test.internal.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  03a461cf_0540_e78e_e0e3_4d56215b3734["Boundary"]
  6ae799da_25a6_b669_4558_e68d5b2a2bdd["ReactHooks-test.internal.js"]
  03a461cf_0540_e78e_e0e3_4d56215b3734 -->|defined in| 6ae799da_25a6_b669_4558_e68d5b2a2bdd
  5a07cf0a_d7a0_dcb5_78a7_43ff069fb74d["getDerivedStateFromError()"]
  03a461cf_0540_e78e_e0e3_4d56215b3734 -->|method| 5a07cf0a_d7a0_dcb5_78a7_43ff069fb74d
  1e536373_fcea_3c84_c02e_9d4c7d899e7b["render()"]
  03a461cf_0540_e78e_e0e3_4d56215b3734 -->|method| 1e536373_fcea_3c84_c02e_9d4c7d899e7b

Relationship Graph

Source Code

packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js lines 1207–1218

    class Boundary extends React.Component {
      state = {};
      static getDerivedStateFromError(error) {
        return {err: true};
      }
      render() {
        if (this.state.err) {
          return 'Oops';
        }
        return this.props.children;
      }
    }

Frequently Asked Questions

What is the Boundary class?
Boundary is a class in the react codebase, defined in packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js.
Where is Boundary defined?
Boundary is defined in packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js at line 1207.

Analyze Your Own Codebase

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

Try Supermodel Free