美文网首页ReactNative
ReactNavigation 重置路由栈

ReactNavigation 重置路由栈

作者: Windows_XP | 来源:发表于2018-08-15 11:44 被阅读0次

    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 重置路由栈

        本文链接:https://www.haomeiwen.com/subject/mhnibftx.html