See React documentation on error boundaries for more info
<ErrorBoundary><div>Child Component</div></ErrorBoundary>
Prop | Type | Default | Description |
---|---|---|---|
children | ReactNode | Components/elements that are checked for errors, if an error happens "Something went wrong." will be shown instead | |
onError | (error: Error, errorInfo: React.ErrorInfo) => void | Optional callback fired when the child component has an error |