Closed sairion closed 8 years ago
Yes this may lead to some trouble. We are trying to keep history and the store in sync. Which uses a combination of history.listen
and store.subscribe
. So dispatching something in your history.listen
function may very well screw some things up.
If you want to do some dispatching work on history/route changes you may have to fallback to using React lifecycle methods or hooking in your own middleware to listen for redux-router actions.
I was debugging this and found this behavior. Am I supposed to leave
store.dispatch
out of history listener?