17 lines
424 B
TypeScript
17 lines
424 B
TypeScript
import { configureStore } from '@reduxjs/toolkit';
|
|
|
|
import { api } from './service/api';
|
|
|
|
export const store = configureStore({
|
|
reducer: {
|
|
[api.reducerPath]: api.reducer,
|
|
},
|
|
middleware: (getDefaultMiddleware) =>
|
|
getDefaultMiddleware({
|
|
serializableCheck: false
|
|
}).concat(api.middleware),
|
|
});
|
|
|
|
export type RootState = ReturnType<typeof store.getState>;
|
|
export type AppDispatch = typeof store.dispatch;
|