Socket
Socket
Sign inDemoInstall

use-error-boundary

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-error-boundary - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

2

package.json
{
"name": "use-error-boundary",
"version": "1.2.2",
"version": "1.2.3",
"description": "React hook for using error boundaries",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -55,19 +55,12 @@ # use-error-boundary

```javascript
const JustRenderMe = () => {
throw new Error('💥')
throw new Error("💥")
}
const MyComponent = () => {
const { ErrorBoundary, didCatch, error } = useErrorBoundary()
const {
ErrorBoundary,
didCatch,
error
} = useErrorBoundary()
return (
{
didCatch ? (
<>
{didCatch ? (
<p>An error has been catched: {error.message}</p>

@@ -78,4 +71,4 @@ ) : (

</ErrorBoundary>
)
}
)}
</>
)

@@ -82,0 +75,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc