{"action":"created","issue":{"url":"https://api.github.com/repos/exponentjs/ex-navigator/issues/20","labels_url":"https://api.github.com/repos/exponentjs/ex-navigator/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/exponentjs/ex-navigator/issues/20/comments","events_url":"https://api.github.com/repos/exponentjs/ex-navigator/issues/20/events","html_url":"https://github.com/exponentjs/ex-navigator/issues/20","id":114476181,"number":20,"title":"setState doesn't re-render the component","user":{"login":"iZaL","id":6410176,"avatar_url":"https://avatars.githubusercontent.com/u/6410176?v=3","gravatar_id":"","url":"https://api.github.com/users/iZaL","html_url":"https://github.com/iZaL","followers_url":"https://api.github.com/users/iZaL/followers","following_url":"https://api.github.com/users/iZaL/following{/other_user}","gists_url":"https://api.github.com/users/iZaL/gists{/gist_id}","starred_url":"https://api.github.com/users/iZaL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iZaL/subscriptions","organizations_url":"https://api.github.com/users/iZaL/orgs","repos_url":"https://api.github.com/users/iZaL/repos","events_url":"https://api.github.com/users/iZaL/events{/privacy}","received_events_url":"https://api.github.com/users/iZaL/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-01T15:38:15Z","updated_at":"2015-11-01T21:00:18Z","closed_at":"2015-11-01T21:00:18Z","body":"I have a state property ```isLoggedIn``` which stores the state of the logged in user. and componentDidMount checks whether the user is logged in. The problem I'm facing is, If componentDidMount method returns isLoggedIn to true, the Exnavigation doesn't navigate to the home screen. It always returns the login screen regardless \r\n\r\n```javascript\r\nexport default class Home extends Component {\r\n\r\n  constructor(props) {\r\n    super(props);\r\n    this.state = {\r\n      isLoggedIn: false,\r\n    }\r\n  }\r\n\r\n  componentDidMount() {\r\n    AuthService.getAuthInfo((err, authInfo)=> {\r\n      this.setState({\r\n        isLoggedIn: authInfo != null,\r\n      })\r\n    });\r\n  }\r\n\r\n  render() {\r\n    let initialRoute = Router.getLoginRoute();\r\n    if (this.state.isLoggedIn) {\r\n      initialRoute = Router.getCategoryListRoute();\r\n    }\r\n\r\n    return this.renderScreen(initialRoute);\r\n  }\r\n\r\n  renderScreen(route) {\r\n    return (\r\n      <ExNavigator\r\n        initialRoute={route}\r\n        style={{ flex: 1 }}\r\n        sceneStyle={{ paddingTop: 64 }}\r\n        />\r\n    );\r\n\r\n  }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/exponentjs/ex-navigator/issues/comments/152863332","html_url":"https://github.com/exponentjs/ex-navigator/issues/20#issuecomment-152863332","issue_url":"https://api.github.com/repos/exponentjs/ex-navigator/issues/20","id":152863332,"user":{"login":"ide","id":379606,"avatar_url":"https://avatars.githubusercontent.com/u/379606?v=3","gravatar_id":"","url":"https://api.github.com/users/ide","html_url":"https://github.com/ide","followers_url":"https://api.github.com/users/ide/followers","following_url":"https://api.github.com/users/ide/following{/other_user}","gists_url":"https://api.github.com/users/ide/gists{/gist_id}","starred_url":"https://api.github.com/users/ide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ide/subscriptions","organizations_url":"https://api.github.com/users/ide/orgs","repos_url":"https://api.github.com/users/ide/repos","events_url":"https://api.github.com/users/ide/events{/privacy}","received_events_url":"https://api.github.com/users/ide/received_events","type":"User","site_admin":false},"created_at":"2015-11-01T21:00:18Z","updated_at":"2015-11-01T21:00:18Z","body":"This is the intended behavior and why the prop is called initialRoute instead of route (this is a React convention that uncontrolled components use). Use push/pop or immediatelyResetRouteStack to change the route after the first render."}}