ReactNavigation 重置路由栈

1.https://blog.csdn.net/u011272795/article/details/79422916

报错:undefined is not a function (evaluating '_reactNavigation.NavigationActions.reset')

修改

    import { NavigationActions, StackActions } from 'react-navigation';
    const resetAction = StackActions.reset({
            index: 0,
            actions: [NavigationActions.navigate({ routeName: 'MainActivity' })],
        });
    this.props.navigation.dispatch(resetAction);

你可能感兴趣的:(ReactNavigation 重置路由栈)