5.7 to 6.0 navigate.back()

In my 5.7 apps (I have three of them) I’m using this:

    methods: {
      back: function(to, options) {
        this.views.main.router.navigate.back(to, options);
      },

And then I call it like this:

      app.views.main.router.back('/', {force: true, ignoreCache: true, reload: true});

My question is this: How do I port this to F7 6.0? I saw somewhere a reference to exporting store, creating a method etc. but I can’t find those instructions anywhere!

(Before anyone asks, back in 2019, there was a discussion about why we do it this way - it’s to control the transition direction).

you don’t need such global method, just call directly

app.views.main.router.back('/', {force: true, ignoreCache: true, reload: true})

where you need it.

Or, in case you really need it, you can just create global method like:

window.appBack = () => {
  app.views.main.router.back('/', {force: true, ignoreCache: true, reload: true})
}

And call it as window.appBack() where needed