majic / src /redux /store /store.ts
nolual's picture
Upload 55 files
0c20ea8
import { configureStore } from "@reduxjs/toolkit";
import createSagaMiddleware from "redux-saga";
import poiReducer from "../reducers/poiReducer";
import { watchFetchPoi } from "../sagas/poiSaga";
const sagaMiddleware = createSagaMiddleware();
const store = configureStore({
reducer: {
poi: poiReducer,
},
middleware: [sagaMiddleware],
});
sagaMiddleware.run(watchFetchPoi);
export type RootState = ReturnType<typeof store.getState>;
export default store;