-
Notifications
You must be signed in to change notification settings - Fork 644
Causes reactRouter onUpdate to be double invoked #108
Comments
Thanks, @tomatau. Seeing the same in my app when I add a |
I've got a failing test, looking for a solution that doesn't break other stuff. |
@tomatau I found a solution and created a PR. I'll have to think a bit more on it as I'm not entirely sure about the implementation, but hopefully we should have a fix soon. |
I'm closing this as we're tracking it in #109 |
Thanks for addressing this so quickly |
I re-opened it. #109 already solves a double update, but there might be another problem here. Will look at it tomorrow. |
When navigating with pushPath, it dispatches When navigating with a normal Link (history), the |
When redux-simple-router is setup and a path is updated through a Link or IndexLink from react router, the Router.onUpdate method is double invoked.
If pushPath or updatePath is used, the onUpdate behaves normally.
Here's a branch where it's happening for me
onUpdate handler:
https://github.com/tomatau/breko-hub/blob/versionUpdates/src/app/entry.js#L33
integration:
https://github.com/tomatau/breko-hub/blob/versionUpdates/src/app/state/store.js#L23
navigation:
https://github.com/tomatau/breko-hub/blob/versionUpdates/src/app/components/containers/HeadNavigation.js#L23
The text was updated successfully, but these errors were encountered: