Home / Class/ Boundary Class — react Architecture

Boundary Class — react Architecture

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

Entity Profile

Dependency Diagram

graph TD
  ca75ada5_b0b5_4403_f673_7ad7b7ea2026["Boundary"]
  e830a60d_4147_3606_7890_6db744e9073f["ReactIncremental-test.js"]
  ca75ada5_b0b5_4403_f673_7ad7b7ea2026 -->|defined in| e830a60d_4147_3606_7890_6db744e9073f
  4e59457d_0e3c_baf2_d305_c7718881bb8b["componentDidCatch()"]
  ca75ada5_b0b5_4403_f673_7ad7b7ea2026 -->|method| 4e59457d_0e3c_baf2_d305_c7718881bb8b
  c7464932_6c16_2e4f_22ea_600709a6fd80["render()"]
  ca75ada5_b0b5_4403_f673_7ad7b7ea2026 -->|method| c7464932_6c16_2e4f_22ea_600709a6fd80

Relationship Graph

Source Code

packages/react-reconciler/src/__tests__/ReactIncremental-test.js lines 2793–2804

      class Boundary extends React.Component {
        state = {didError: false};
        componentDidCatch() {
          this.setState({didError: true});
        }
        static contextTypes = {
          color: () => null,
        };
        render() {
          return this.state.didError ? null : <Thing />;
        }
      }

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free