Last active
April 14, 2019 00:44
-
-
Save mikeapr4/82e60bec879553e9128cf44d0f7f90ce to your computer and use it in GitHub Desktop.
Code Samples - Mutations vs Actions
This file contains hidden or 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
mutations: { | |
setName(state, name) { | |
state.name = name; | |
}, | |
}, | |
actions: { | |
setName({ commit }, name) { | |
commit('setName', name); | |
}, | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment