Question: I'm new in Vuejs and I have a problem.

I need to use a store but I only have its name in string. I know that I can access the method that I wrote (all() ) of the store by writing :
`storeName.all`

but I only have
`this.storeName` as a string and writing `this.storeName.all` doesn't work

Answer: 
Maybe you can use these hooks: *beforeRouteEnter*, *beforeRouteUpdate* or *beforeRouteLeave*, as described here: <https://router.vuejs.org/guide/advanced/navigation-guards.html#in-component-guards>

Each hook has these parameters: *from*, *to*, and *next*.
Based on the suggestions in <https://stackoverflow.com/a/65592158/7762322> by dyon048

I was able to achieve this by doing

```html
<template>
  <nuxt-link :to="prevRoute">Back</nuxt-link>
</template>

```

```js
export default {
  data() {
    return {
      prevRoute: '',
    }
  },
  beforeRouteEnter(to, from, next) {
    next((vm) => {
      vm.prevRoute = from
    })
  },
}

```