import { createStore, applyMiddleware, combineReducers } from "redux"; import { composeWithDevTools } from "redux-devtools-extension"; import thunk from "redux-thunk"; import * as reducers from "./reducers"; import { persistStore, persistReducer } from "redux-persist"; import storage from "redux-persist/lib/storage"; // defaults to localStorage for web const initialState = {}; const middleware = [thunk]; const store = createStore( combineReducers(reducers), applyMiddleware(thunk), initialState, composeWithDevTools(applyMiddleware(...middleware)) ); export default store;