Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/atatus/redux-atatus-middleware

Redux middleware for Atatus error logging
https://github.com/atatus/redux-atatus-middleware

Last synced: 5 days ago
JSON representation

Redux middleware for Atatus error logging

Awesome Lists containing this project

README

        

# Redux Atatus

Redux middleware for [Atatus](https://github.com/atatus/atatus-js) error logging

#### Why add Atatus via Redux middleware?

Because Redux contains the state of your whole application and is aware of the last action dispatched before each error. This is useful information we want the error log to contain so we've added this to the params object in Atatus.

### Setting up

#### 1. Add dependencies

``` bash
npm install redux-atatus-middleware --save
```

#### 2. Import dependency

``` js
import atatusMiddleware from 'redux-atatus-middleware';
```

#### 3. Configure & add middleware

``` js
const errorMiddleware = atatusMiddleware();

export const store = createStore(
rootReducer,
applyMiddleware(
errorMiddleware
)
);

export default store;
```