我有两个主屏幕:
如何使BottomTabBar中的按钮单击以打开新屏幕?
默认情况下,底部栏中的按钮会打开一个新标签。我想要一个按钮来打开一个全新的屏幕
就像在屏幕上一样
带有标签的屏幕代码(3个元素):
function App() {
return (
<NavigationContainer>
<Tab.Navigator tabBarOptions={{
showLabel: true,
style: {
backgroundColor: 'transparent',
position: 'absolute',
borderTopWidth: 0,
elevation: 0,
}
}}>
<Tab.Screen name="Home" component={Home}/>
<Tab.Screen name="Second" component={Second}/>
<Tab.Screen name="Other" component={Other} />
</Tab.Navigator>
</NavigationContainer>
);
}