Decorators on class for ES2015?


#1

Has somebody found a practical way to setup decorators for ES2015 classes ? Babel supports it


#2

You can create a package using babel-compiler and activate es7.decorators.


#3

You can use decorators in Aurelia https://atmospherejs.com/ahmedshuhel/aurelia. It uses all the ES2015 and ES2016 goodies


#4

Interesting solution but according to its Package.js file it’s only available on the server. Did you toy with it on the client?


#5

Intriguing, it leverages Babel by using its own extension ‘.es.js’. Sounds worth the experiment except for React’s JSX files. Not sure that I could chain both. At least for every bits that doesn’t use React, I could live with this double extension.

Thanks.


#6

Yeah, the extension is convenience until Meteor officially suports ES2015 import export module loading. Plus Aurelia offers what React offers but far more…


#7

At least not server-side rendering for the near future, but the framework is interesting enough to keep an eye on. Oh my eyes hurt!