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; export default store;