Nuxt/test/fixtures/basic/plugins/vuex-module.js
pooya parsa e7cc2757c3 refactor: update eslint-config to 1.x
Co-authored-by: Alexander Lichter <manniL@gmx.net>
2019-07-10 15:15:49 +04:30

19 lines
338 B
JavaScript

export default function ({ store }) {
store.registerModule('simpleModule', {
namespaced: true,
state: () => ({
mutateMe: 'not mutated'
}),
actions: {
mutate ({ commit }) {
commit('mutate')
}
},
mutations: {
mutate (state) {
state.mutateMe = 'mutated'
}
}
})
}