I have doubts regarding the mentioned operator, here is an example, what role does it play?
computed: {
...mapGetters({
vuexGetter: "getter",
}),
},
I have doubts regarding the mentioned operator, here is an example, what role does it play?
computed: {
...mapGetters({
vuexGetter: "getter",
}),
},
In this case it
mapGetters
will return an object with the functions that act as getters in your Vuex store . All this thanks to the spread operator (...) that will extract each one of the getters and leave them under the objectcomputed
.in your case
It is equivalent to
Using the spread syntax would allow your getters to co-exist with local computed properties of your component.
I leave you some more info about spread and rest (and Vue)