New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@alesmenzel/error-boundary

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alesmenzel/error-boundary

React Error Boundary Component

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

Error Boundary

Simple implementation of React's Error Boundary.

Installation

npm install @alesmenzel/error-boundary

Usage

function App({ name }) {
  return (
    <ErrorBoundary
      onError={(error, info) => /* optionally, send to your favourite logger */ }
      fallback={({error, retry}) => <NoAvatar />}
      // or
      fallback={<NoAvatar />}
    >
      <Avatar name={name}/>
    </ErrorBoundary>
  )
}

FAQs

Package last updated on 15 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts