DEV Community

Discussion on: What's the purpose of Vuex?

Collapse
 
koladev profile image
Mangabo Kolawole

Oh I am happy. Finally, an human explanation of the existence of Vuex. 😁
But can you explain or give some ressources for concepts as getters, mutation, actions ? Because I don’t know exactly when I have to use each one of them

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt

To me, currently, Vuex is like an object, with additional immutability safety.

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
vinceramces profile image
Vince Ramces Oliveros

Actions can be called in async. Its not always on the API call(Axios, fetch or whatever HTTP request) but returns a Promise. After the promise/async has fulfilled. You can proceed to mutations to mutate the state.

Collapse
 
firstclown profile image
Joe Erickson

I talk about this in Understanding data flow in Vuex :: JErickson.net. Take a look at that and see if that answers your question.