Skip to content

Commit 60025a3

Browse files
author
Sergio Daniel Xalambrí
authored
Update README.md
1 parent 8fc0a06 commit 60025a3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const store = createStore(reducer, applyMiddleware(
1919
reduxCatch(errorHandler)
2020
));
2121
```
22+
2223
- `reduxCatch` receive a function to use when an error happen.
2324
- The error handler function could be just a `console.error` like the example above or a function to log the error in some kind of error tracking platform.
2425
- You should use this middleware as the first middleware in the chain, so its allowed to catch all the possible errors in the application.
@@ -29,6 +30,7 @@ To use it with Sentry just download the Sentry script from npm:
2930
```bash
3031
npm i -S raven-js raven
3132
```
33+
3234
- [raven-js](https://www.npmjs.com/package/raven-js): This is the client for browser usage.
3335
- [raven-node](https://github.com/getsentry/raven-node): This is the client for server usage.
3436

@@ -48,9 +50,7 @@ And then use `Raven.captureException` as the error handler like this:
4850

4951
```javascript
5052
const store = createStore(reducer, applyMiddleware(
51-
reduxCatch(function (error) {
52-
Raven.captureException(error);
53-
});
53+
reduxCatch(error => Raven.captureException(error));
5454
));
5555
```
5656

0 commit comments

Comments
 (0)