clear navigation history react navigation code example
Example: react navigation history clear
import {NavigationActions, StackActions} from 'react-navigation';
const resetAction = StackActions.reset({
index: 0,
actions: [NavigationActions.navigate({routeName: 'Home'})],
key: null,
});
this.props.navigation.dispatch(resetAction);