November 2017
Beginner to intermediate
398 pages
8h 42m
English
Back to our BlogMap component; we can use the helpers to map the getters and the actions:
import { createNamespacedHelpers } from 'vuex'const { mapGetters, mapActions,} = createNamespacedHelpers('maps')export default { computed: { ...mapGetters([ 'center', 'zoom', ]), mapOptions () { // ... }, }, methods: mapActions([ 'setCenter', 'setZoom', ]),}
Now the state of the map is managed in the Vuex store!
Read now
Unlock full access