📜  反应导航历史清除 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:02:27.532000             🧑  作者: Mango

代码示例1
import {NavigationActions, StackActions} from 'react-navigation';

 const resetAction = StackActions.reset({
      index: 0,
      actions: [NavigationActions.navigate({routeName: 'Home'})],
      key: null,
    });
    this.props.navigation.dispatch(resetAction);