media_player_wrapper
Version:
A React Native wrapper for live audio streaming.
21 lines (16 loc) • 571 B
JavaScript
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;
}