An unopinionated `<ErrorBoundary />` React component for React 16+.
An unopinionated <ErrorBoundary />
React component for React 16+.
<div>
<ErrorBoundary
onError={logError}
>
{error => error
? (
<h1>Oh no an error occurred!</h1>
)
: (
<Application />
)
}
</ErrorBoundary>
</div>
onError
method called after <ErrorBoundary />
catches an error.
function
error
object thrownchildren
function called inside render