Closed kristian-elder closed 7 years ago
A bit more context:
We dynamically add reducers to redux when loading routes, ultimately resulting in a call to store.replaceReducer(makeRootReducer(...))
When this happens, toastr appears to replay something and displays the previous toasts again.
Is there a workaround for this?
FYI - we've worked around this in our app by explicitly clearing toasts after injecting new reducers, but would be even nicer if we didn't have it.
Additional additional info: We are using immutable.js for the redux store.
If you used 'react-redux-starter-kit', check this source (https://github.com/davezuko/react-redux-starter-kit/commit/820ca897db802979be2ce46e4d016076744145a2) and this issue(https://github.com/gaearon/redux-devtools/issues/304)
+1 on this issue. We are doing code splitting and loading reducers dynamically. Any pointers or examples on how you solved it @kristian-elder?
Also using immutable.js. Our app is based on https://github.com/react-boilerplate/react-boilerplate
I don't have this issue with v4.4.6 Do have it in v5.0.0
Using react-redux-starter-kit
@kristian-elder are you still having this issue?
Same as TheSharpieOne, applying https://github.com/gaearon/redux-devtools/issues/304#issuecomment-251715413, together with another change that re-injected reducers unnecessarily, has fixed it for us - we are no longer having the problem.
Thanks!
I've successfully wired up react-redux-toastr, and notifications appear as expected. However, when we go to a new route in our app, the old notifications appear again.
In the redux dev tools, I can see @ReducToastr/toastr/REMOVE being emitted again after the toast flashes, but no actions for triggering a toast (by our application or toastr itself).
Not sure if it is a route change that triggers it or something else, but for whatever reason, they re-appear.