React hook for using error boundaries in your functional components
MIT License
Published by JoschuaSchneider over 3 years ago
You can now install this package with React 17 🎉
>=16.9.0
react-dom
dependencyPublished by JoschuaSchneider over 3 years ago
Introduces a reset
method to reset the error boundary state.
Thanks to @futursolo (#21 ) for the suggestion!
reset
functionalityPublished by JoschuaSchneider about 4 years ago
This package no longer makes use of prop-types
as a dependency.
Published by JoschuaSchneider about 4 years ago
Fixed CI integration, new releases will be published to npm.
For full release notes check out Moving to TypeScript
Published by JoschuaSchneider about 4 years ago
Hotfix for broken tests in CI environment.
For full Release notes, check out Release Move to Typescript
Published by JoschuaSchneider about 4 years ago
This update includes:
This removes the errorInfo
property from the hook return value and from the renderError
callback.
This is because the ErrorBoundary uses the static getDerivedStateFromError
to set its error state. This method does not provide the errorInfo
object.
As an alternative, I have introduces an optional options
object with an onDidCatch
callback:
useErrorBoundary({
onDidCatch: (error, errorInfo) => {}
})
Types are now included via the npm "types" config key.
Published by JoschuaSchneider about 4 years ago
This release moves react
out of the dependencies
and into peerDependencies
and devDependencies
to avoid multiple react versions when importing this module.
Thanks to @mossymaker for the PR.
Published by JoschuaSchneider over 4 years ago
Improved documentation and examples:
Published by JoschuaSchneider almost 5 years ago
Updated vulnerable dependencies using npm audit.
Published by JoschuaSchneider almost 5 years ago
Updated a few vulnarable dependencies.