Skip to content

Instantly share code, notes, and snippets.

@emilhein
Created June 4, 2022 06:12
Show Gist options
  • Save emilhein/270ca43d58d9a1b207af794e93c3a69e to your computer and use it in GitHub Desktop.
Save emilhein/270ca43d58d9a1b207af794e93c3a69e to your computer and use it in GitHub Desktop.
const store = createStore({
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