ptomasroos / react-native-tab-navigator

A tab bar that switches between scenes, written in JS for cross-platform support
MIT License
2.4k stars 416 forks source link

Rendering custom tab #25

Closed bartgryszko closed 6 years ago

bartgryszko commented 8 years ago

Hi, thank you for creating and maintaining this lib! I PR small feature for rendering custom tabs. If you have any feedback let me know & feel free to merge it if you find it useful. Example:

<TabNavigator.Item
  selected={this.state.selectedTab === 'home'}
  renderTab={() => (
    <HomeTab
      selected={this.state.selectedTab === 'home'}
      onPress={() => this.setState({ selectedTab: 'home' })}
      />
  )}>
  <HomeScene />
</TabNavigator.Item>
ptomasroos commented 7 years ago

Is still something you're using as a pattern @bgryszko ?

ptomasroos commented 6 years ago

Will close since this issue is more than a year, feel free to a open a new if this is still a issue.