mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Add redux-logger.
This automatically logs state changes (in a readable form) to the js console. We'll probably want to turn this off in production to cut down on log noise.
This commit is contained in:
@@ -4,6 +4,7 @@ import frontLinesReducer from "../api/frontLinesSlice";
|
||||
import supplyRoutesReducer from "../api/supplyRoutesSlice";
|
||||
import tgosReducer from "../api/tgosSlice";
|
||||
import { Action, ThunkAction, configureStore } from "@reduxjs/toolkit";
|
||||
import logger from "redux-logger";
|
||||
|
||||
export const store = configureStore({
|
||||
reducer: {
|
||||
@@ -13,6 +14,8 @@ export const store = configureStore({
|
||||
supplyRoutes: supplyRoutesReducer,
|
||||
tgos: tgosReducer,
|
||||
},
|
||||
// The logger middleware must be last or it won't log actions.
|
||||
middleware: [logger],
|
||||
});
|
||||
|
||||
export type AppDispatch = typeof store.dispatch;
|
||||
|
||||
Reference in New Issue
Block a user