Answer the question
In order to leave comments, you need to log in
Vuex mutation on every request, which is better?
I am using Vuex. There is a need to support requests to a third-party service. But the fact is that there is a system object with each request, something like:
{
type: 'system',
package: 1
}
Answer the question
In order to leave comments, you need to log in
Maybe you shouldn't store it in vuex. Store it in the object where all requests come from, i.e. for example, wrap vue-resource in your http module and increment there when called. If necessary, then additionally save to localStorage/localSession.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question