Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
firebase.initializeApp(config.firebase)
}
// if (window.Cypress) {
// firebase.functions().useFunctionsEmulator('http://localhost:5005');
// }
// ======================================================
// Store Instantiation and HMR Setup
// ======================================================
const store = createStore(
makeRootReducer(),
initialState,
compose(
reactReduxFirebase(window.fbInstance || firebase, combinedConfig),
reduxFirestore(window.fbInstance || firebase),
applyMiddleware(...middleware),
...enhancers
)
)
store.asyncReducers = {}
// Setup hot module reloading to correctly replace reducers
if (module.hot) {
module.hot.accept('./reducers', () => {
const reducers = require('./reducers').default
store.replaceReducer(reducers(store.asyncReducers))
})
}
return store
}