Skip to content

components/bits/SilentErrorBoundary#

SilentErrorBoundary#

Catches errors in a non-critical widget so it cannot take the app down.

A failed widget leaves a small marker whose tooltip names the component and the error, instead of disappearing.

Extends#

  • Component<Props, State>

Constructors#

Constructor#

new SilentErrorBoundary(props): SilentErrorBoundary;
Parameters#
Parameter Type
props Props
Returns#

SilentErrorBoundary

Overrides#
Component<Props, State>.constructor

Methods#

componentDidCatch()#

componentDidCatch(error, errorInfo): void;

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

Parameters#
Parameter Type
error Error
errorInfo ErrorInfo
Returns#

void

Overrides#
Component.componentDidCatch

getDerivedStateFromError()#

static getDerivedStateFromError(error): Partial<State>;
Parameters#
Parameter Type
error Error
Returns#

Partial<State>

render()#

render(): 
  | string
  | number
  | boolean
  | Element
  | Iterable<ReactNode, any, any>;
Returns#

| string | number | boolean | Element | Iterable<ReactNode, any, any>

Overrides#
Component.render