Created
February 27, 2017 22:41
-
-
Save hal0gen/82859edd80cac3416ae1fed6d49fee06 to your computer and use it in GitHub Desktop.
Redux vs Vuex
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
state: { | |
count: 1 | |
} | |
// Vuex Mutation | |
increment(state) { | |
// mutate state | |
state.count++; | |
} | |
// Redux Reducer | |
increment(state) { | |
// return new state | |
return state.count + 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment