Typescript/ES7 Decorators to make Vuex modules a breeze
npm install -D vuex-module-decorators
- You need to install
- For reduced code with decorators, set
importHelpers: trueand install
The conventional old & boring way
Remember how vuex modules used to be made ?
Hello Decorators !
Well not anymore. Now you get better syntax. Inspired by
async MutationAction === magic
Want to see something even better ?
Automatic getter detection
this is turned into the equivalent
Putting into the store
Use the modules just like you would earlier
Written with StackEdit.
Originally published at gist.github.com.