Files
wok-able/assets/src/app/store.ts

20 lines
632 B
TypeScript
Raw Normal View History

2022-03-23 01:53:45 +01:00
import { configureStore } from "@reduxjs/toolkit";
import AuthReducer from "../features/auth/auth-slice";
2022-04-30 22:39:16 +02:00
import ThemeSlice from "../features/theme/theme-slice";
2022-03-23 01:53:45 +01:00
import {cardDeckApiSlice} from "../features/cardDecks/cardDeck-api-slice";
export const store = configureStore({
reducer: {
auth: AuthReducer,
2022-04-30 22:39:16 +02:00
theme: ThemeSlice,
2022-03-23 01:53:45 +01:00
[cardDeckApiSlice.reducerPath]: cardDeckApiSlice.reducer
},
middleware: (getDefaultMiddleware) => {
return getDefaultMiddleware().concat(cardDeckApiSlice.middleware);
}
});
export type AppDispatch = typeof store.dispatch;
export type RootState = ReturnType<typeof store.getState>;