react-navigation重置路由传参

react-navigation中的reset方法

const resetAction = NavigationActions.reset({
    index: 0,
    actions: [
    NavigationActions.navigate({routeName: 'Home', params: { token: '123456' }})
    ]
})

this.props.navigation.dispatch(resetAction);

获取参数
this.props.navigation.state.params.token

你可能感兴趣的:(react-navigation重置路由传参)