N
N
nezzard2019-08-20 13:59:06
Vue.js
nezzard, 2019-08-20 13:59:06

How to pass route to store?

Hello, I have a piece of code

async fetch({store}) {
  await store.dispatch('movies/setMovies');
}

And there are corresponding actions and mutations. I need to somehow pass an additional page_num parameter to store. Tried all options, nothing helps.
The task is as follows, let's say we are on page 2 "domain.loc/ page_num =2"
When we update the page, then offset should work in actions if we are on page 2, 3, etc.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nezzard, 2019-08-20
@nezzard

Figured out watchQuery
: true,

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question