Documents / @faasjs/react / ErrorBoundary
Class: ErrorBoundary
Extends
Component
<ErrorBoundaryProps
, {error
:Error
;info
: {componentStack
:string
; }; }>
Constructors
new ErrorBoundary()
new ErrorBoundary(
props
):ErrorBoundary
Parameters
props
Returns
Overrides
Component< ErrorBoundaryProps, { error?: Error info?: { componentStack?: string } } >.constructor
Methods
componentDidCatch()
componentDidCatch(
error
,info
):void
Catches exceptions generated in descendant components. Unhandled exceptions will cause the entire component tree to unmount.
Parameters
error
Error
info
any
Returns
void
Overrides
Component.componentDidCatch
render()
render():
string
|number
|bigint
|boolean
|Element
|Iterable
<ReactNode
> |Promise
<AwaitedReactNode
>
Returns
string
| number
| bigint
| boolean
| Element
| Iterable
<ReactNode
> | Promise
<AwaitedReactNode
>
Overrides
Component.render
Properties
displayName
static
displayName:string
='ErrorBoundary'
whyDidYouRender
static
whyDidYouRender:boolean
=true