/* there is no such event in late 2021 in the vue router.
use the popstate event of the window instance instead. */
// vue lifecycle hook
created() {
window.onpopstate = function(event: PopStateEvent) {
event.preventDefault();
// your logic goes here
}
}