Skip to content

Instantly share code, notes, and snippets.

@hal0gen
Created February 27, 2017 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hal0gen/82859edd80cac3416ae1fed6d49fee06 to your computer and use it in GitHub Desktop.
Save hal0gen/82859edd80cac3416ae1fed6d49fee06 to your computer and use it in GitHub Desktop.
Redux vs Vuex
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