Hi, I found a problem while trying to use react-router with redux-elm.
If I have simple components without sagas all works as in this example.
Through if I'm creating components with sagas as mentioned in tutorial I get a problem when changing location more then once to component with saga:
WARNING: The Saga instance has already been mounted, this basically mean that your Updaters do not form a tree, please be sure that every Updater is wrapped by another Updater (except root updater). It does not make sense to use combineReducers for Updaters.
log @ logger.js:8
warn @ logger.js:14
mount @ SagaRepository.js:49
(anonymous) @ Updater.js:132
(anonymous) @ storeEnhancer.js:54
So from some little investigation I found that when saga is created it is using action.matching.id (in my case it was GifViewerPair.) and adds saga into this.sagas["GifViewerPair."] (with dot at the end), while unmount saga looks by id GifViewerPair (with no dot at the end) and for sure it doesn't find it and not unmounting the saga.
So as the result when using react-router when component is Unmounted saga stay in the saga repository, and when we mount same component again by navigating back to page with that component it try to mount saga again, but saga is already there as same id with dot at the end is used.
Hi, I found a problem while trying to use
react-router
withredux-elm
.If I have simple components without sagas all works as in this example.
Through if I'm creating components with sagas as mentioned in tutorial I get a problem when changing location more then once to component with saga:
I've used components from tutorial:
router/view.js:
router/updater.js:
gif-viewer-pair/updater.js:
gif-viewer-pair/view.js:
So from some little investigation I found that when saga is created it is using
action.matching.id
(in my case it wasGifViewerPair.
) and adds saga intothis.sagas["GifViewerPair."]
(with dot at the end), while unmount saga looks by idGifViewerPair
(with no dot at the end) and for sure it doesn't find it and not unmounting the saga.So as the result when using
react-router
when component is Unmounted saga stay in the saga repository, and when we mount same component again by navigating back to page with that component it try to mount saga again, but saga is already there as same id with dot at the end is used.