vuex

what is vuex?

  • a state management pattern + library for vue.js application
  • centralized store for all components in a application
  • ensuring the state can only be mutated in a predictable fashion.
  • has vue-dev-tool support

property in vuex instance

  • state
  • getters
  • mutations
  • actions
  • state.commit
  • state.dispatch can return a Promise instance

helpers in Vuex

  • mapState
  • mapGetters
  • mapMutations
  • mapActions