Category "vuex"

Returning Promises from Vuex actions

I recently started migrating things from jQ to a more structured framework being VueJS, and I love it! Conceptually, Vuex has been a bit of a paradigm shift fo

Reevaluate Nuxt.js middleware without a route change

I'm wondering if it's possible to essentially "reevaluate" the middleware conditions without actually changing the current route. The middleware's purpose is to

How to use vue router and vuex inside custom element from root?

I have project with nested custom elements. Now I need to vuex & vue router. How I can use this packages from root custom element and then use in all child

How can i make sure a vuex action has finished before the page loads

I have 2 issues where i pull data from an api and use it. However, the page loads before the api request has completed. My first problem is in the router. I hav

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 mean? It happens when I try to type in the edit i

How to access async store data in vue-router for usage in beforeEnter hook?

How is it possible to access store data in beforeEnter which is retrieved asynchronously via the store action? import store from './vuex/store'; store.dispatc

How do I set initial state in Vuex 2?

I am using Vue.js 2.0 and Vuex 2.0 for a small app. I am initializing the store in the 'created' life-cycle hook on the root Vue instance by calling an action t

Nuxt.js vuex store not persisted

I've got some strange issues with my Nuxt.js Setup. Some States in Store arent persistent, everytime I load another view, they went back to the default value. p

vuex-persist not updating vuex state

I'm having a difficult time figuring out why my state isn't changing in vuex persist. Part of the code is shown below: <v-btn :disabled="!isEditing"

How to do getter with parameter using vuex-module-decorators?

I'm trying to implement a vuex getter function (with parameter) using the Typescript/ES7 Decorators provided by vuex-module-decorators. the normal vuex implemen

How Do I Use Axios to Post Form Data?

I am working on a project with a springboot backend and Vue frontend. Right now I am able to GET a list of products from my DB. I can GET the list and display i

Vuejs String formatting not working correctly

Hi am trying to style a div dynamically in VueJs.But facing this problem that the this.currentProgressLevel is not applied to the width property inside the curr

Can not catch Vuex state change in my Vue component

I have a Vuex store where I have a getter which works correctly and I can see the changes on the state. But if I call this getter as computed property in compon

Check if vuex-persist has restored data in Nuxt project

I have added Vuex-Persist and Vuex-ORM to my Nuxt project. When the application starts for the first time I want to add some boilerplate data. In my default.vu

_vuex.default.store is not a constructor

I'm trying to test a component that uses vuex inside it, I'm trying to pass the store of the respective component so that it can be assembled, but I'm getting t

Switch off vuex-persist if using IE

In my vuex store I use the vuex-persist plugin which works great, in all modern browsers. It doesn't work in IE11 and I would like to be able to switch off the

Why I can't save Vuex states with vuex-persistedstate and js-cookie?

I'm trying to save Vuex states inside Cookies as I see in the documentation. js-cookies and vuex-persistedstate are imported this way: import createPersistedSt

How to visualize a v-chart in an v-for where each object is the data of the v-chart?

I want to generate dynamically some v-charts from Echarts in a v-for. The data for the v-or is comming from the vuex store and is correct. I get a dictionary,

Vuex modules with typescript

EDIT: Since vue conference Toronto (late 2021), Vue has officially switched over to Pinia for typescript support, instead of Vuex. They also acknowledge that Vu