Top "Vuex" questions

Vuex is a state management pattern + library for Vue.

Vuex | How to commit a global mutation in a module action?

I have an action in a namespaced module and a global mutation (i.e. not in a module). I would …

vue.js vuejs2 vuex
Accessing rootState in Vuex getter

How do you access rootState in getters? const getters = { getParams: rootState => { return rootState.route.params }, } The above doesn't work. …

javascript vue.js vuex
Pass params to mapGetters

I use vuex and mapGetters helper in my component. I got this function: getProductGroup(productIndex) { return this.$store.getters['products/…

vuejs2 vuex
Getting router params into Vuex actions

I would like to pass router params into Vuex actions, without having to fetch them for every single action in …

javascript flux vue.js vuex
Data() VS asyncData() in Nuxt & vue

Both data() and async data() gives the same result (and it is obvious that the results from asyncData() override the …

vue.js vuejs2 vuex nuxt.js
How can I call method from data on vue.js?

My vue component like this : <template> ... <ul class="nav nav-tabs nav-tabs-bg"> <li v-for="tab in …

javascript vue.js vuejs2 vue-component vuex
How to check in a Vue component if a user is authenticated in Laravel?

As the title states, I'm a little confused how I would tackle a method in my Vue Component with if/…

laravel authentication vue.js vuex
Difference between Asyncdata vs Fetch

What is the exact difference between fetch and async data. The official documentation says the following: asyncData You may want …

vue.js vuejs2 vuex nuxt.js
Return value from vuex mutation? (id for newly created object)

I'm trying to create an object in one part of vuex store, and then pass id to it to another …

vue.js vuejs2 vuex
How do I warn a user of unsaved changes before leaving a page in Vue

I have an UnsavedChangesModal as a component that needs to be launched when the user tries to leave the page …

javascript vue.js vuex