Skip to content

@sqlrooms/ui / ErrorBoundary

Class: ErrorBoundary

Extends

  • Component<Props, State>

Constructors

Constructor

new ErrorBoundary(props): ErrorBoundary

Parameters

ParameterType
propsProps

Returns

ErrorBoundary

Inherited from

Component<Props, State>.constructor

Constructor

new ErrorBoundary(props, context): ErrorBoundary

Parameters

ParameterTypeDescription
propsProps-
contextanyvalue of the parent Context specified in contextType.

Returns

ErrorBoundary

Inherited from

Component<Props, State>.constructor

Properties

PropertyModifierTypeOverrides
statepublicStateComponent.state

Methods

getDerivedStateFromError()

static getDerivedStateFromError(error): State

Parameters

ParameterType
errorError

Returns

State


componentDidCatch()

componentDidCatch(error, errorInfo): void

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

Parameters

ParameterType
errorError
errorInfoErrorInfo

Returns

void

Overrides

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

Component.render