UNPKG

media_player_wrapper

Version:
21 lines (16 loc) 571 B
import { createStore, applyMiddleware } from "redux"; import rootReducers from "../rootReducer"; import thunk from "redux-thunk"; export default function configureStore() { const enhancer = applyMiddleware(thunk); // Creating the store const store = createStore(rootReducers, enhancer); // Enabling loading the root reducer while the hot reload is on if (module.hot) { module.hot.accept("../rootReducer", () => { const nextRootReducer = require("../rootReducer").default; store.replaceReducer(nextRootReducer); }); } return store; }