1.2.0 • Published 7 months ago

react-error-catcher v1.2.0

Weekly downloads
39
License
MIT
Repository
github
Last release
7 months ago

English | 简体中文

React Error Catcher 🍑

This is a powerful React error catcher!

It can catch these below:

When error catched, you will get a list of errors by onCatch event

As we all konw, sometime errors can be too much to handle, so i filter the mutiple errors, also i support the filters for you to define which error can be ignored!

Install

Run npm install react-error-catcher or yarn add react-error-catcher to install it

Then you can use it in your project like this:

import ErrorCatcher from 'react-error-catcher'

const App = () => {
  return (<ErrorCatcher>
    <Main />
    </ErrorCatcher>)
}

export default App

Props

properitydescriptiontypedefault
errorRenderwhen an error occurs in component rendering, decide which lower layer component to displayReact.ReactNode\Something went wrong\
userwho cause the errorstring"unkonwn user"
apperror occurs in which appstring"unkonwn app"
maxwhen the catched errors exceeds the max value, trigger the callback methodnumber1
delayreport error interval, unit is millisecondnumber60000
filtersdefine the errors which can be ignoredstring[]-
onCatchcallback when catching errors and achieving the trigger cases(error: ErrorInfo[]) => any-

About

If you want to develop a npm library, you can see npm-template, welecome to star and fork!

1.2.0

7 months ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago