How does a Mapgetter work?

mapGetters and mapActions are basically a helper provided by vuex which returns an object with keys as method names and values as methods with some defined definition. This object when combined with … (Object spread operator) spreads it out into individual functions in the computed or methods object respectively.

Read more

Why should I use getters in Vuex?

Here are a few things that are great about getters: They are easily accessible inside both components and Vuex actions ; They cache data and smartly update themselves when the state changes; They can return functions, so that it’s possible to pass additional arguments to calculate data based on them.

Read more