import { configureStore } from '@reduxjs/toolkit'; import { apiSlice } from './apiSlice'; import authReducer from './features/auth/authSlice'; export default configureStore({ reducer: { [apiSlice.reducerPath]: apiSlice.reducer, auth: authReducer }, middleware: getDefaultMiddleware => getDefaultMiddleware().concat(apiSlice.middleware) }); export type RootState = ReturnType export type AppDispatch = typeof store.dispatch