Sha256: 06d26c27ba05aaccca92510dc56fdfe71366dd614da43b0e8564ca3c88def52b
Contents?: true
Size: 625 Bytes
Versions: 2
Compression:
Stored size: 625 Bytes
Contents
// https://vuex.vuejs.org/guide/mutations.html // // The only way to actually change state in a Vuex store is by committing a // mutation. Vuex mutations are very similar to events: each mutation has a // string type and a handler. The handler function is where we perform actual // state modifications, and it will receive the state as the first argument // // One important rule to remember is that mutation handler functions must be // synchronous // export const mutations = { // // this.$store.commit('<%= store_name %>/incrementCounter', 42 ) // setCounter(state, payload) { // state.counter = payload // }, }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vue-generators-0.1.3 | lib/vue/generators/vue/store/templates/mutations.template |
vue-generators-0.1.2 | lib/vue/generators/vue/store/templates/mutations.template |