{"action":"created","issue":{"url":"https://api.github.com/repos/react-native-community/react-native-tab-view/issues/357","repository_url":"https://api.github.com/repos/react-native-community/react-native-tab-view","labels_url":"https://api.github.com/repos/react-native-community/react-native-tab-view/issues/357/labels{/name}","comments_url":"https://api.github.com/repos/react-native-community/react-native-tab-view/issues/357/comments","events_url":"https://api.github.com/repos/react-native-community/react-native-tab-view/issues/357/events","html_url":"https://github.com/react-native-community/react-native-tab-view/issues/357","id":261618710,"number":357,"title":"component re-rendering is not working   ","user":{"login":"11et401012","id":26785189,"avatar_url":"https://avatars1.githubusercontent.com/u/26785189?v=4","gravatar_id":"","url":"https://api.github.com/users/11et401012","html_url":"https://github.com/11et401012","followers_url":"https://api.github.com/users/11et401012/followers","following_url":"https://api.github.com/users/11et401012/following{/other_user}","gists_url":"https://api.github.com/users/11et401012/gists{/gist_id}","starred_url":"https://api.github.com/users/11et401012/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/11et401012/subscriptions","organizations_url":"https://api.github.com/users/11et401012/orgs","repos_url":"https://api.github.com/users/11et401012/repos","events_url":"https://api.github.com/users/11et401012/events{/privacy}","received_events_url":"https://api.github.com/users/11et401012/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-09-29T11:58:24Z","updated_at":"2018-05-02T19:16:33Z","closed_at":null,"author_association":"NONE","body":"**here is  my  code :**\r\n\r\nexport default class TabViewExample extends PureComponent {\r\n  static title = 'Scrollable top bar';\r\n  \r\n  state = {\r\n    index: 3,\r\n    routes: [\r\n      { key: '1', title: 'Tasks' },\r\n      { key: '2', title: 'Ongoing' },\r\n      { key: '3', title: 'Approval' },\r\n      { key: '4', title: 'Pending' },\r\n      { key: '5', title: 'Accomplished' },\r\n\r\n    ],\r\n    loaded:false,\r\n  };\r\n\r\n\r\n  // C6426E\r\n  _handleIndexChange = index => this.setState({ index });\r\n\r\n  _renderHeader = props => <TabBar {...props} style={styles.tabbar} />;\r\n\r\n  _renderScene = SceneMap({\r\n    '1': List,\r\n    '2': OngoingList,\r\n    '3': ApprovalList,\r\n    '4': PendingList,\r\n    '5': AccomplishedList,\r\n\r\n  });\r\n\r\n  render() {\r\n    return (\r\n      <TabViewAnimated\r\n        style={styles.container}\r\n        navigationState={this.state}\r\n        renderScene={this._renderScene}\r\n        renderHeader={this._renderHeader}\r\n        onIndexChange={this._handleIndexChange}\r\n      />\r\n    );\r\n  }\r\n}"},"comment":{"url":"https://api.github.com/repos/react-native-community/react-native-tab-view/issues/comments/386089743","html_url":"https://github.com/react-native-community/react-native-tab-view/issues/357#issuecomment-386089743","issue_url":"https://api.github.com/repos/react-native-community/react-native-tab-view/issues/357","id":386089743,"user":{"login":"pravesh-curefit","id":33955423,"avatar_url":"https://avatars0.githubusercontent.com/u/33955423?v=4","gravatar_id":"","url":"https://api.github.com/users/pravesh-curefit","html_url":"https://github.com/pravesh-curefit","followers_url":"https://api.github.com/users/pravesh-curefit/followers","following_url":"https://api.github.com/users/pravesh-curefit/following{/other_user}","gists_url":"https://api.github.com/users/pravesh-curefit/gists{/gist_id}","starred_url":"https://api.github.com/users/pravesh-curefit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pravesh-curefit/subscriptions","organizations_url":"https://api.github.com/users/pravesh-curefit/orgs","repos_url":"https://api.github.com/users/pravesh-curefit/repos","events_url":"https://api.github.com/users/pravesh-curefit/events{/privacy}","received_events_url":"https://api.github.com/users/pravesh-curefit/received_events","type":"User","site_admin":false},"created_at":"2018-05-02T19:16:33Z","updated_at":"2018-05-02T19:16:33Z","author_association":"NONE","body":"I am facing the same issue with my code.\r\nMy renderScene method was\r\n\r\n`\r\n_renderScene = SceneMap({\r\n        preBookedOrders: () => <PreBookedOrders pendingDelivery={this.state.pendingDelivery} delivered={this.state.delivered} navigate={this.props.navigation.navigate} />,\r\n        newOrders: () => <View style={[styles.container, { backgroundColor: '#673ab7' }]} />,\r\n    });\r\n`\r\n\r\nI changed it to \r\n`\r\n_renderScene = ({ route }) => {\r\n        switch (route.key) {\r\n            case 'preBookedOrders':\r\n                return <PreBookedOrders pendingDelivery={this.state.pendingDelivery} delivered={this.state.delivered} navigate={this.props.navigation.navigate} />\r\n            case 'newOrders':\r\n                return <View style={[styles.container, { backgroundColor: '#673ab7' }]} />\r\n            default:\r\n                return null;\r\n        }\r\n    }\r\n`\r\n\r\nBut still, when my Main component re-renders, my PreBookedOrders component doesn't re-render. What should I do?"}}
{"actor":{"display_login":"pravesh-curefit"}}