Answer the question
In order to leave comments, you need to log in
Is it possible to write the state in Vuex getters somehow?
There are getters in vuex that filters a large array, is it possible somehow to write the final result (the resulting array) into the state?
Answer the question
In order to leave comments, you need to log in
<input v-model="a">
// ...
computed: {
a: {
get () {
return this.$store.state.a
},
set (value) {
this.$store.commit('updateA', value)
}
}
}
What for? Vuex getters are memoized, only recalculated if something has changed.
In principle, it is possible to watch change in some component (or directly) and put it in the state, but there is no need.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question