Created
June 4, 2022 06:12
-
-
Save emilhein/270ca43d58d9a1b207af794e93c3a69e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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