React Native Navigation:从通过标签导航呈现的屏幕之一打开模式

时间:2018-10-23 11:06:38

标签: react-native react-native-navigation

我有以下导航配置。

const authStackNavigator = createStackNavigator({ Welcome: WelcomeScreen, Login: Login });

`const AppTabNavigator = createBottomTabNavigator(   {     主页:{       屏幕:DashboardScreen,     },     任务:任务

}`

const AppStackNavigator = createStackNavigator({ AppTabNavigator: { screen: AppTabNavigator }} );

const AppModalStack = createStackNavigator( { Main: { screen: AppStackNavigator, }, MyModal: { screen: ModalScreen, }, }, { mode: 'modal', headerMode: 'none', } );

export default createSwitchNavigator({ authLoading: Login, auth: authStackNavigator, App: AppModalStack });

以及 DashboardScreen Tasks 屏幕,我试图打开如下所示的模式。 const navigate = this.props.navigation; return ( <Button title="click" onPress={() => navigate.navigate('MyModal')} /> ) 但没有打开模式

我该怎么做? 此实现有什么问题。

0 个答案:

没有答案