我使用StackNavigator实现了Splash Screen。从中我导航到TabNavigator,其中每个Tabs包含一个StackNavigator。如何将Splash屏幕中的参数传递给TabNavigator StackNavigators中的组件
闪
const resetAction = NavigationActions.reset({
index: 0,
actions: [
{
type: 'Navigation/INIT',
routeName: 'TabScreen',
params: {
userLocation
}
}
]
})
this.props.navigation.dispatch(resetAction);
TabNavigator的
const InformationStack = StackNavigator({
Information: { screen: Information },
});
const TabScreen = TabNavigator(
{
Information: { screen: InformationStack }
},
我无法访问信息中的参数。有人请帮忙
params: { userLocation }