import {createStore, combineReducers, applyMiddleware} from 'redux';
import thunk from 'redux-thunk';
import logger from 'redux-logger';
import { campsites } from './campsites';
import { comments } from './comments';
import { promotions } from './promotions';
import { partners } from './partners';
export const ConfigureStore = () => {
const store = createStore(
combineReducers({
campsites,
comments,
partners,
promotions
}),
applyMiddleware(thunk, logger)
);
return store;
}
import { createStore, applyMiddleware, combineReducers } from "redux";
import thunkMiddleware from "redux-thunk";
import { composeWithDevTools } from "redux-devtools-extension";
import AuthReducer from "./reducers/AuthReducer";
const rootReducers = combineReducers({
AuthReducer,
});
const middleware = [thunkMiddleware];
const Store = createStore(
rootReducers,
composeWithDevTools(applyMiddleware(...middleware))
);
export default Store;