Closed mgfjx closed 7 years ago
for example:
<TabNavigator> <TabNavigator.Item selected={this.state.selectedTab === 'home'} title="Home" renderIcon={() => <Image source={...} />} renderSelectedIcon={() => <Image source={...} />} badgeText="1" onPress={() => this.setState({ selectedTab: 'home' })}> {homeView} </TabNavigator.Item> <TabNavigator.Item selected={this.state.selectedTab === 'profile'} title="Profile" renderIcon={() => <Image source={...} />} renderSelectedIcon={() => <Image source={...} />} renderBadge={() => <CustomBadgeView />} onPress={() => this.setState({ selectedTab: 'profile' })}> {profileView} </TabNavigator.Item> </TabNavigator>
I want to replace the {homeView} with a native controller, how should I do?
{homeView}
You need to bridge your native view to React Native yourself. This isn't specific to the tab navigator component, this is a better question for Stack Overflow.
for example:
I want to replace the
{homeView}
with a native controller, how should I do?