Анатолий Кучин Asked:2020-03-11 23:13:55 +0800 CST2020-03-11 23:13:55 +0800 CST 2020-03-11 23:13:55 +0800 CST 如何从 React Native 中的导航堆栈中清除上一个屏幕? 772 如何从 React Native 中的导航堆栈中清除上一个屏幕? reactjs 1 个回答 Voted Best Answer Ulan4eg 2020-03-17T14:46:29+08:002020-03-17T14:46:29+08:00 import { StackActions, NavigationActions } from 'react-navigation'; const resetAction = StackActions.reset({ index: 0, // <-- currect active route from actions array actions: [ NavigationActions.navigate({ routeName: 'myRouteWithDisabledBackFunctionality' }), ], }); this.props.navigation.dispatch(resetAction); https://stackoverflow.com/questions/42831685/disable-back-button-in-react-navigation
https://stackoverflow.com/questions/42831685/disable-back-button-in-react-navigation