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
网友评论