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

18 lines
553 B
TypeScript

import { configureStore } from "@reduxjs/toolkit";
import AuthReducer from "../features/auth/auth-slice";
import {cardDeckApiSlice} from "../features/cardDecks/cardDeck-api-slice";
export const store = configureStore({
reducer: {
auth: AuthReducer,
[cardDeckApiSlice.reducerPath]: cardDeckApiSlice.reducer
},
middleware: (getDefaultMiddleware) => {
return getDefaultMiddleware().concat(cardDeckApiSlice.middleware);
}
});
export type AppDispatch = typeof store.dispatch;
export type RootState = ReturnType<typeof store.getState>;