Skip to content

Class: ErrorBoundary ​

Extends ​

Constructors ​

Constructor ​

new ErrorBoundary(props): ErrorBoundary

Creates an error boundary with optional fallbacks and debug info.

Parameters ​

ParameterTypeDescription
propsErrorBoundaryProps-

Returns ​

ErrorBoundary

Overrides ​

React.Component<ErrorBoundaryProps, {hasError: boolean;}>.constructor

Methods ​

componentDidCatch() ​

componentDidCatch(error): void

Catches exceptions generated in descendant components. Unhandled exceptions will cause the entire component tree to unmount.

Parameters ​

ParameterType
errorError

Returns ​

void

Overrides ​

React.Component.componentDidCatch


render() ​

render(): string | number | bigint | boolean | Iterable<ReactNode, any, any> | Promise<AwaitedReactNode> | Element | null | undefined

Returns ​

string | number | bigint | boolean | Iterable<ReactNode, any, any> | Promise<AwaitedReactNode> | Element | null | undefined

Overrides ​

React.Component.render