ErrorBoundary
A container component that catches errors and displays a fallback UI.
Props#
Prop | Type | Default | Description |
---|---|---|---|
children | type ONLY_FOR_FORMAT =
| string
| number
| boolean
| ReactElement<any, string | JSXElementConstructor<any>>
| Iterable<ReactNode>
| ReactPortal
| PromiseLikeOfReactNode | ||
fallback | type ONLY_FOR_FORMAT =
| string
| number
| boolean
| ReactElement<any, string | JSXElementConstructor<any>>
| Iterable<ReactNode>
| ReactPortal
| PromiseLikeOfReactNode | ||
onError | (error: Error, errorInfo: ErrorInfo) => void |
Was this helpful?