Skip to content

Instantly share code, notes, and snippets.

@championswimmer
Created July 14, 2018 00:06
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 championswimmer/582ac43cad84cb006b0a1c37af6541fb to your computer and use it in GitHub Desktop.
Save championswimmer/582ac43cad84cb006b0a1c37af6541fb to your computer and use it in GitHub Desktop.
@Module
class MyModule extends VuexModule {
wheels = 2
@Mutation
incrWheels(extra) {
this.wheels += extra
}
get axles() {
return (this.wheels / 2)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment