React-Navigation跳转并清除路由记录(重置)

//跳转并清空路由记录
 import { NavigationActions } from 'react-navigation'
const  resetAction = NavigationActions.reset({
                index: 0,
                actions: [
                    NavigationActions.navigate({routeName:'xxx'})//要跳转到的页面名字
                ]
            });
this.props.navigation.dispatch(resetAction);

你可能感兴趣的:(React-Navigation跳转并清除路由记录(重置))