Record Redux actions in Raygun

This commit is contained in:
Marks Polakovs 2020-05-05 20:41:29 +02:00
parent df73be6a91
commit fd20a5e925

View file

@ -1,5 +1,6 @@
import rootReducer, { RootState } from "./rootReducer";
import raygun from "raygun4js"
import { configureStore, Action, getDefaultMiddleware } from "@reduxjs/toolkit";
import rootReducer, { RootState } from "./rootReducer";
import { ThunkAction } from "redux-thunk";
import {
mixerMiddleware,
@ -12,6 +13,13 @@ const store = configureStore({
middleware: [
mixerMiddleware,
mixerKeyboardShortcutsMiddleware,
store => next => action => {
raygun("recordBreadcrumb",
"redux-action",
action
);
return next(action);
},
...getDefaultMiddleware(),
],
});