Skip to content

Instantly share code, notes, and snippets.

@paramsinghvc
Created August 15, 2017 10:09
Show Gist options
  • Save paramsinghvc/b6d5c25cffa0e6a648f06c2783821ee9 to your computer and use it in GitHub Desktop.
Save paramsinghvc/b6d5c25cffa0e6a648f06c2783821ee9 to your computer and use it in GitHub Desktop.
const store = new Vuex.Store({
state: {
count: 0
},
mutations: {
increment (state) {
state.count++
}
},
actions: {
increment (context) {
context.commit('increment')
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment