Top "Vuex" questions

Vuex is a state management pattern + library for Vue.

Vuex rendering data that is fetched from REST API

For such component <template> <div> <router-link :to="{name:'section', params: { sectionId: firstSectionId }}">Start</…

vue.js vuex
How do I call a getter from another getter in Vuex?

Consider a simple Vue blog: I'm using Vuex as my datastore and I need to set up two getters: a …

vuejs2 vuex
Vuex - Do not mutate vuex store state outside mutation handlers

Why do I get this error: Error [vuex] Do not mutate vuex store state outside mutation handlers. What does it …

vue.js vuex nuxt.js
Accessing getters within Vuex mutations

Within a Vuex store mutation, is it possible to access a getter? Consider the below example. new Vuex.Store({ state: { …

vue.js vuejs2 vuex
How to access the getter from another vuex module?

Within a vuex getter I know it is possible to access the state from another vuex module like so: pages: (…

javascript vue.js vuejs2 vuex
Change another module state from one module in Vuex

I have two modules in my vuex store. var store = new Vuex.Store({ modules: { loading: loading posts: posts } }); In the …

vue.js vuejs2 vuex
vuexjs getter with argument

Is there a way to pass parameter into getter of vuex store? Something like: new Vuex.Store({ getters: { someMethod(arg){ // …

javascript vue.js vuejs2 vuex
Axios interceptor in vue 2 JS using vuex

I store token after success login call in vuex store like this: axios.post('/api/auth/doLogin.php', params, …

vue.js vuejs2 axios interceptor vuex
How to structure api calls in Vue.js?

I'm currently working on a new Vue.js application. It depends heavily on api calls to my backend database. For …

api structure vue.js vuex
async/await actions in Vuex

I am wondering how to use async/await actions in Vuex. The docs provide this syntax as an example: actions: { …

vue.js async-await vuex