LocalErrorBoundary Class — react Architecture
Architecture documentation for the LocalErrorBoundary class in ReactErrorBoundaries-test.internal.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 71773ef4_61e2_0971_7e55_208ae106a0ff["LocalErrorBoundary"] e3be826d_2e6e_c7e0_1926_386d40353a30["ReactErrorBoundaries-test.internal.js"] 71773ef4_61e2_0971_7e55_208ae106a0ff -->|defined in| e3be826d_2e6e_c7e0_1926_386d40353a30 63f181cc_8563_329c_0c17_85d57b283fe9["getDerivedStateFromError()"] 71773ef4_61e2_0971_7e55_208ae106a0ff -->|method| 63f181cc_8563_329c_0c17_85d57b283fe9 2eff1cc2_b736_6b7a_3d30_4b9fad93f0fb["render()"] 71773ef4_61e2_0971_7e55_208ae106a0ff -->|method| 2eff1cc2_b736_6b7a_3d30_4b9fad93f0fb
Relationship Graph
Source Code
packages/react-dom/src/__tests__/ReactErrorBoundaries-test.internal.js lines 2700–2716
class LocalErrorBoundary extends React.Component {
state = {error: null};
static getDerivedStateFromError(error) {
Scheduler.log(`ErrorBoundary static getDerivedStateFromError`);
return {error};
}
render() {
const {children, id, fallbackID} = this.props;
const {error} = this.state;
if (error) {
Scheduler.log(`${id} render error`);
return <Component id={fallbackID} />;
}
Scheduler.log(`${id} render success`);
return children || null;
}
}
Source
Frequently Asked Questions
What is the LocalErrorBoundary class?
LocalErrorBoundary is a class in the react codebase, defined in packages/react-dom/src/__tests__/ReactErrorBoundaries-test.internal.js.
Where is LocalErrorBoundary defined?
LocalErrorBoundary is defined in packages/react-dom/src/__tests__/ReactErrorBoundaries-test.internal.js at line 2700.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free