Frontend/src/store/store.ts

19 lines
511 B
TypeScript
Executable File

import { configureStore } from "@reduxjs/toolkit";
import { articleReducer } from "article/data/articleReducer";
import thunk from "redux-thunk";
import { searchResultReducer } from "searchResults/data/searchReducer";
const store = configureStore({
reducer: {
searchResults: searchResultReducer,
article: articleReducer,
},
middleware: [thunk],
});
export { store };
export type RootState = ReturnType<typeof store.getState>;
export type AppDispatch = typeof store.dispatch;