MapState Auxiliary function in vuex

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

a few times less.
//  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
    }
  })
}
Jul.11,2021

if he doesn't have a namespace, he's just like this:

  

just means there are many ways to write it. Write it in computed, and the corresponding computed will automatically change if the store changes

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5f022-43da5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5f022-43da5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?