mirror of
https://github.com/ershisan99/flashcards-example-project.git
synced 2025-12-17 20:59:31 +00:00
lesson 3 in progress
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
import { configureStore } from '@reduxjs/toolkit'
|
||||
import { setupListeners } from '@reduxjs/toolkit/query/react'
|
||||
|
||||
import { api } from '@/services/auth'
|
||||
import { baseApi } from './base-api'
|
||||
|
||||
export const store = configureStore({
|
||||
reducer: {
|
||||
[api.reducerPath]: api.reducer,
|
||||
[baseApi.reducerPath]: baseApi.reducer,
|
||||
},
|
||||
middleware: getDefaultMiddleware => getDefaultMiddleware().concat(api.middleware),
|
||||
middleware: getDefaultMiddleware => getDefaultMiddleware().concat(baseApi.middleware),
|
||||
})
|
||||
|
||||
export type AppDispatch = typeof store.dispatch
|
||||
export type RootState = ReturnType<typeof store.getState>
|
||||
|
||||
setupListeners(store.dispatch)
|
||||
|
||||
Reference in New Issue
Block a user