ErrorBoundary

Component to catch rendering errors

See React documentation on error boundaries for more info

<ErrorBoundary>
<div>Child Component</div>
</ErrorBoundary>

Props

PropTypeDefaultDescription
childrenReactNodeComponents/elements that are checked for errors, if an error happens "Something went wrong." will be shown instead
onError(error: Error, errorInfo: React.ErrorInfo) => voidOptional callback fired when the child component has an error