Closed radiorz closed 3 years ago
Hi @radiorz.
Sorry if that's not clear...
The component helper sync()
will build computed properties which do dispatches / commits inside itself.
If you want to attach methods to your components which call actions of the same name, you can use call()
which will is effectively the same as mapActions()
.
You can also use this.$store.set('value', value)
which will (depending on your config) target actions or commits (dispatch('setValue', value)
or commit('value', value)
).
Finally, you can import { commit, disptach } from 'vuex-pathify'
which are effectively proxies for store.commit(...)
and store.dispatch(...)
.
Make sense?
cool thanks @davestewart it helps.
Good luck, and have fun with it!
the way to get values from vuex store with vuex-pathify is great.but how can i do the dispatch and commit (change the values inside state).