{"action":"created","issue":{"url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/183","repository_url":"https://api.github.com/repos/aksonov/react-native-router-flux","labels_url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/183/labels{/name}","comments_url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/183/comments","events_url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/183/events","html_url":"https://github.com/aksonov/react-native-router-flux/issues/183","id":132103862,"number":183,"title":"Actions.currentRouter.currentRoute is not updated","user":{"login":"mmazzarolo","id":9536354,"avatar_url":"https://avatars.githubusercontent.com/u/9536354?v=3","gravatar_id":"","url":"https://api.github.com/users/mmazzarolo","html_url":"https://github.com/mmazzarolo","followers_url":"https://api.github.com/users/mmazzarolo/followers","following_url":"https://api.github.com/users/mmazzarolo/following{/other_user}","gists_url":"https://api.github.com/users/mmazzarolo/gists{/gist_id}","starred_url":"https://api.github.com/users/mmazzarolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmazzarolo/subscriptions","organizations_url":"https://api.github.com/users/mmazzarolo/orgs","repos_url":"https://api.github.com/users/mmazzarolo/repos","events_url":"https://api.github.com/users/mmazzarolo/events{/privacy}","received_events_url":"https://api.github.com/users/mmazzarolo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-02-08T10:27:30Z","updated_at":"2016-02-10T08:43:19Z","closed_at":null,"body":"Hi,\r\nI'm having a strange issue, whenever I try to get the current route name from `Actions.currentRouter.currentRoute` I get the previous outdated route.\r\nThe strange thing is that if I check `currentRoute` of `Actions.currentRouter` in the developer console I can see the correct route.\r\n\r\n```javascript\r\nfunction onEnterHandler() {\r\n  console.log(Actions.currentRouter)\r\n  console.log(Actions.currentRouter.currentRoute)\r\n  return true\r\n}\r\n\r\nexport default class Routes extends React.Component {\r\n  render() {\r\n    return (\r\n      <Router sceneStyle={{ paddingTop: topPadding }}\r\n        onPop={onEnterHandler}\r\n        onReplace={onEnterHandler}\r\n        onPush={onEnterHandler}\r\n      >\r\n        <Route\r\n          name='session'\r\n          component={SessionScreen}\r\n          type=\"replace\"\r\n          initial={true}\r\n        />\r\n        <Route\r\n          name='place'\r\n          component={PlaceScreen}\r\n          type=\"replace\"\r\n          title='Ristoranti'\r\n        />\r\n      </Router>\r\n    )\r\n  }\r\n}\r\n```\r\n\r\nThe result from the logging when I navigate to the `place` route from the `session` route is the following:\r\n<img src=\"http://i.imgur.com/GAf8ut1.png\" />\r\n\r\nAs you can see the log of `Actions.currentRouter` shows the correct `currentRoute`, while `Actions.currentRouter.currentRoute` show the outdated one.\r\n\r\nI even tried checking the currentRoute from different places (e.g.: componentDidMount) and components with different Actions (pop/replace) but the issue persist.\r\n\r\nThank you in advance,\r\nMatteo."},"comment":{"url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/comments/182253976","html_url":"https://github.com/aksonov/react-native-router-flux/issues/183#issuecomment-182253976","issue_url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/183","id":182253976,"user":{"login":"aksonov","id":1321329,"avatar_url":"https://avatars.githubusercontent.com/u/1321329?v=3","gravatar_id":"","url":"https://api.github.com/users/aksonov","html_url":"https://github.com/aksonov","followers_url":"https://api.github.com/users/aksonov/followers","following_url":"https://api.github.com/users/aksonov/following{/other_user}","gists_url":"https://api.github.com/users/aksonov/gists{/gist_id}","starred_url":"https://api.github.com/users/aksonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aksonov/subscriptions","organizations_url":"https://api.github.com/users/aksonov/orgs","repos_url":"https://api.github.com/users/aksonov/repos","events_url":"https://api.github.com/users/aksonov/events{/privacy}","received_events_url":"https://api.github.com/users/aksonov/received_events","type":"User","site_admin":false},"created_at":"2016-02-10T08:43:18Z","updated_at":"2016-02-10T08:43:18Z","body":"@mmazzarolo Hm... If you can change redux state with currentRoute, what problem to pass this state to the component? It is Redux, isn't?\r\n"}}