doesn"t understand how helper functions get multiple states in a document. Can you give a detailed and simple description of the
mapState helper function
when a component needs to obtain multiple states, declaring these states as computational properties is somewhat repetitive and redundant. To solve this problem, we can use the mapState helper function to help us generate the calculation properties so that you can press the key
// Vuex.mapState
import { mapState } from "vuex"
export default {
// ...
computed: mapState({
//
count: state => state.count,
// "count" `state => state.count`
countAlias: "count",
// `this`
countPlusLocalState (state) {
return state.count + this.localCount
}
})
}