我有一个堆栈导航器,用于导航到所需的任何屏幕。但我也有一个只有四个屏幕的选项卡导航器。
我想让 Tab Navigator 出现在除登录和创建屏幕之外的每个屏幕上。
我已经尝试了很多组合这些的变体,但似乎都没有奏效
const stackNav = createStackNavigator({
Login: {
screen: LoginScreen
},
Scan: {
screen: ScanScreen
},
Search: {
screen: SearchScreen
},
Product: {
screen: ProductScreen
},
Create: {
screen: CreateScreen
},
Home: {
screen: HomeScreen
},
Profile: {
screen: ProfileScreen
}
}, {
headerMode: 'none',
defaultNavigationOptions: {
gesturesEnabled: false
}
})
const tabNav = createBottomTabNavigator({
HomeTab: {
screen: HomeScreen,
},
ScanTab: {
screen: ScanScreen,
},
SearchTab: {
screen: SearchScreen,
},
ProfileTab: {
screen: ProfileScreen,
}
})
export default createAppContainer(stackNav)