redux-catcher
v0.2.1
Published
Error handling for redux.
Downloads
7
Readme
Redux Catcher
Error handling for redux.
Support Flux Standard Action.
Example action for a rejected Promise:
{
type: 'FAILURE_ADD_TODO',
payload: new Error(),
error: true
}
Install
yarn add redux-catcher
or
npm i redux-catcher
Apply middleware
const handler = action => {
console.log(action)
}
import { createCatcher } from 'redux-catcher'
applyMiddleware(
createCatcher(handler)
)
TODOs
- [x] Create createCatcher
- [ ] Create test
LICENCE
MIT