In order to make webpack hot module reload work properly we need to have something like this to update the store when an update, a computed value or an epic is modified.
redux and redux-observable already implement this feature.
Do you think it is possible ? easy ?
if (module.hot) {
module.hot.accept('../reducers', () =>
store.replaceReducer(require('../reducers')) // eslint-disable-line global-require
);
const epic$ = new BehaviorSubject(rootEpic);
module.hot.accept('./where-ever-they-are', () => {
const nextRootEpic = require('./where-ever-they-are').rootEpic;
epic$.next(nextRootEpic);
});
}
https://redux-observable.js.org/docs/recipes/HotModuleReplacement.html
In order to make webpack hot module reload work properly we need to have something like this to update the store when an update, a computed value or an epic is modified.
redux and redux-observable already implement this feature.
Do you think it is possible ? easy ?
https://redux-observable.js.org/docs/recipes/HotModuleReplacement.html