我有一个下面的导航器:
BottomNavigator
Home -> (Profile Screen)
StackNavigator
Menu -> (Profile Screen)
我的问题是-
我应该在哪里将个人资料屏幕从首页和有意义的菜单屏幕。
对我的英语表示感谢和抱歉。
如下所示,用新的stackNavigator包装BottomNavigator
和ProfileScreen
。并且不要忘记提供一些选择。
例如,
StackNavigator
ㄴBottomNavigator
ㄴ ...
ㄴProfileScreen
const RootNavigator = createStackNavigator({
Bottom: BottomNavigator,
Profile: ProfileScreen
}, {
defaultNavigationOptions: {
mode: 'modal',
header: none,
}
})
它使您可以从任何地方调用Profile
。
navigation.navigate('Profile')