What's Changed
const [error] = useErrorBoundary();
-
The
error
wrapping that was introduced in v2 has been removed.error
will now be the error that was caught without any wrapping for thrown primitives. The types have been updated tounknown
to reflect that thrown JavaScript errors may be any type not just instances ofError
. -
withErrorBoundary
now propagates the wrapped component display name for improved debugging with React dev tools. It will display asWithErrorBoundary(${Component.displayName})
.
Full Changelog: v2.0.1...v3.0.0