From fd20a5e925c38c6be7e99b7fc1c72a5c21738939 Mon Sep 17 00:00:00 2001 From: Marks Polakovs Date: Tue, 5 May 2020 20:41:29 +0200 Subject: [PATCH] Record Redux actions in Raygun --- src/store.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/store.ts b/src/store.ts index 6a9e26c..9d6af98 100644 --- a/src/store.ts +++ b/src/store.ts @@ -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(), ], });