FrontendDeveloper.in

Vue.js question detail

What is mapGetter helper??

The mapGetters is a helper that simply maps store getters to local computed properties.

For example, the usage of getters for todo app would be as below,

import { mapGetters } from 'vuex'

export default {
computed: {
// mix the getters into computed with object spread operator
...mapGetters([
'completedTodos',
'todosCount',
// ...
])
}
}
Back to all Vue.js questions
Get LinkedIn Premium at Rs 399