Typescript/ES7 Decorators to make Vuex modules a breeze
https://gist.github.com/1dac7efca0b334bd94b89fc35e275aca
- You need to install
babel-plugin-transform-decorators
- set
experimentalDecorators
to true - For reduced code with decorators, set
emitHelpers: true
andimportHelpers: true
Remember how vuex modules used to be made ?
https://gist.github.com/088b14974746fdc04801ccd5a9081349
Well not anymore. Now you get better syntax. Inspired by vue-class-component
https://gist.github.com/0ae91192f75fa962642aecf05c30f035
Want to see something even better ?
https://gist.github.com/378ebfa813c772692cf5613ce0a24e68
https://gist.github.com/582ac43cad84cb006b0a1c37af6541fb
this is turned into the equivalent
https://gist.github.com/f521a511f99404d7877305f0782e9b8c
Use the modules just like you would earlier
https://gist.github.com/827b53a2a5ac151331e9e5efd2bc3189
Written with StackEdit.