{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/1403","labels_url":"https://api.github.com/repos/facebook/react-native/issues/1403/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/1403/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/1403/events","html_url":"https://github.com/facebook/react-native/issues/1403","id":80794811,"number":1403,"title":"SetState does not rerender NavigatorIOS component (w/ example repo)","user":{"login":"the4dpatrick","id":3721451,"avatar_url":"https://avatars.githubusercontent.com/u/3721451?v=3","gravatar_id":"","url":"https://api.github.com/users/the4dpatrick","html_url":"https://github.com/the4dpatrick","followers_url":"https://api.github.com/users/the4dpatrick/followers","following_url":"https://api.github.com/users/the4dpatrick/following{/other_user}","gists_url":"https://api.github.com/users/the4dpatrick/gists{/gist_id}","starred_url":"https://api.github.com/users/the4dpatrick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the4dpatrick/subscriptions","organizations_url":"https://api.github.com/users/the4dpatrick/orgs","repos_url":"https://api.github.com/users/the4dpatrick/repos","events_url":"https://api.github.com/users/the4dpatrick/events{/privacy}","received_events_url":"https://api.github.com/users/the4dpatrick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-26T05:04:37Z","updated_at":"2015-05-28T20:36:51Z","closed_at":null,"body":"Here is a repo showing the bug https://github.com/the4dpatrick/react-native-bug-example\r\n\r\nI am trying to toggle NavigatorIOS on and off based on the prop `navigationBarHidden` set to a state value. \r\n\r\n```\r\n    return (\r\n      <NavigatorIOS\r\n        style={styles.container}\r\n        initialRoute={initialRoute}\r\n        navigationBarHidden={this.state.hideNavbar}\r\n        configureScene={() => Navigator.SceneConfigs.PushFromRight}/>\r\n    );\r\n```\r\n\r\nI pass along a method to child components that passes the parent's context and toggle the state value.\r\n```\r\n  toggleNavigation() {\r\n    this.setState({\r\n      hideNavbar: !this.state.hideNavbar\r\n    });\r\n  }\r\n```\r\n```\r\n     initialRoute = { \r\n        component: ScreenWithMenu, \r\n        title: 'Screen', \r\n        passProps: {\r\n          toggleNavigation: this.toggleNavigation.bind(this)\r\n        } \r\n      };\r\n```\r\n\r\nInside the sidemenu, I am calling `this.props.toggleNavigation()` onPress. This correctly toggles the navbar when initially hidden, but when you press `onLeftButtonPress`, the navbar does not toggle off. \r\n```\r\n  navigateToThemes() {\r\n    var Themes = require('../Screens/Themes');\r\n\r\n    this.props.menuActions.close();\r\n    this.props.toggleNavigation();\r\n    this.props.navigator.push({\r\n      component: Themes,\r\n      title: 'Themes',\r\n      leftButtonTitle: 'Back',\r\n      onLeftButtonPress: () => {\r\n        this.props.navigator.pop();\r\n        this.props.toggleNavigation();\r\n      },\r\n      passProps: { navigator: this.props.navigator }\r\n    })\r\n  }\r\n```\r\n\r\nHere is the start of the IRC chat on this bug https://botbot.me/freenode/reactnative/2015-05-26/?msg=40122019&page=1"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/106588791","html_url":"https://github.com/facebook/react-native/issues/1403#issuecomment-106588791","issue_url":"https://api.github.com/repos/facebook/react-native/issues/1403","id":106588791,"user":{"login":"brentvatne","id":90494,"avatar_url":"https://avatars.githubusercontent.com/u/90494?v=3","gravatar_id":"","url":"https://api.github.com/users/brentvatne","html_url":"https://github.com/brentvatne","followers_url":"https://api.github.com/users/brentvatne/followers","following_url":"https://api.github.com/users/brentvatne/following{/other_user}","gists_url":"https://api.github.com/users/brentvatne/gists{/gist_id}","starred_url":"https://api.github.com/users/brentvatne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brentvatne/subscriptions","organizations_url":"https://api.github.com/users/brentvatne/orgs","repos_url":"https://api.github.com/users/brentvatne/repos","events_url":"https://api.github.com/users/brentvatne/events{/privacy}","received_events_url":"https://api.github.com/users/brentvatne/received_events","type":"User","site_admin":false},"created_at":"2015-05-28T20:36:51Z","updated_at":"2015-05-28T20:36:51Z","body":"@the4dpatrick - [this commit](https://github.com/brentvatne/react-native-bug-example/commit/e0655d19821072f7d2ace9bea42902ab50e9d861) on your project fixes the problem, but I think it's a little hacky. If you want to clean it up into a nicer solution that would be great. Feel free to clone that repo and try it - I included the `node_modules` directory in it because I made changes directly to the React Native source"}}