React Native:将参数从StackNavigator传递并获取到DrawerNavigator

时间:2018-07-14 14:28:11

标签: react-native react-navigation

如何从First screen的{​​{1}}到GridV1 screen传递参数并获得参数

尽管它们具有不同的导航类型(SplashScreenStackNavigator

DrawerNavigator

在SplashScreen中

const MyApp = StackNavigator({
First: {
    screen: Screens.SplashScreen
},
Home: {
    screen: DrawerNavigator({
        GridV1: {screen: GridV1Screen},
        GridV2: {screen: GridV2Screen},
            ...
    },
    {
        drawerPosition: 'right',
        drawerOpenRoute: 'DrawerOpen',
        drawerCloseRoute: 'DrawerClose',
        drawerToggleRoute: 'DrawerToggle',
        contentComponent: (props) => <SideMenu {...props}/>
    })
}
}, {
    headerMode: 'none',
});

0 个答案:

没有答案