Closed amirmohsen closed 9 years ago
Thanks!
Hm, are there anonymous classes possible in ES6? So Buttons.Red = class extends BlazeComponent {}
?
Yeah, it should be possible. Checkout this MDN article with more details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/class ES6 classes are just syntactic sugar for prototypical inheritance so in essence, there's nothing new here.
Yea, but probably stack then looks uglier.
I don't think this bit in the readme file is valid ES6. If you want to use classes to create namespaces, it has to be done via assignment.
The preferred way of doing namespaces are through using the new module system. Unfortunately, Meteor hasn't integrated ES6 modules yet so we are stuck with this method for now.