{"action":"closed","issue":{"url":"https://api.github.com/repos/yahoo/fluxible-router/issues/66","labels_url":"https://api.github.com/repos/yahoo/fluxible-router/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/yahoo/fluxible-router/issues/66/comments","events_url":"https://api.github.com/repos/yahoo/fluxible-router/issues/66/events","html_url":"https://github.com/yahoo/fluxible-router/issues/66","id":94773168,"number":66,"title":"history state pushed twice","user":{"login":"pumpikano","id":603889,"avatar_url":"https://avatars.githubusercontent.com/u/603889?v=3","gravatar_id":"","url":"https://api.github.com/users/pumpikano","html_url":"https://github.com/pumpikano","followers_url":"https://api.github.com/users/pumpikano/followers","following_url":"https://api.github.com/users/pumpikano/following{/other_user}","gists_url":"https://api.github.com/users/pumpikano/gists{/gist_id}","starred_url":"https://api.github.com/users/pumpikano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pumpikano/subscriptions","organizations_url":"https://api.github.com/users/pumpikano/orgs","repos_url":"https://api.github.com/users/pumpikano/repos","events_url":"https://api.github.com/users/pumpikano/events{/privacy}","received_events_url":"https://api.github.com/users/pumpikano/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-13T17:43:01Z","updated_at":"2015-07-14T01:33:57Z","closed_at":"2015-07-14T01:33:57Z","body":"I am experiencing an issue where the history state is pushed twice in a single route when calling `navigateAction`. `RouteStore` handles both `NAVIGATE_START` and `NAVIGATE_SUCCESS` events by updating the store and calling `emitChange`. Since `handleHistory` listens to `RouteStore`, it's `componentDidUpdate` method ends up being called twice, once for each of those two events. There are no checks in `componentDidUpdate` to prevent the history state from being pushed twice.\r\n\r\nAm I somehow misusing something here?\r\n\r\nMy proposed fix is to only push the history state when the navigation is complete and succeeds, probably by checking `this.props.isNavigateComplete` and `this.props.currentNavigateError` in `componentDidUpdate`. Does this sound like a reasonable strategy? I should note that many of `handleHistory`'s tests will need to change since many of the tests test state after `routeStore._handleNavigateStart` is called."}}