How to add Button to a BottomTabNavigator on React Native?

后端 未结 1 730
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-29 01:32

My goal is to have both Top and Bottom navigation bar for Home, Dashboard, and Album, but not for the SignIn. Here\'s the catch, I wish to put

相关标签:
1条回答
  • 2021-01-29 02:19

    You can use the tabbarbutton like below. This would pass the props and render a the touchableopacity and you can have your own onPress.

    You can navigate, here i have given an alert

        <Tab.Screen name="Settings"  
             options={({navigation})=> ({
               tabBarButton:props => <TouchableOpacity {...props} onPress={()=>navigation.navigate('SignIn')}/>
        })}/>
    
    0 讨论(0)
提交回复
热议问题