Can Ember component classes be swapped out for native ES classes? If not, are there any addons that make this possible? I’m aware of the ES classes RFC but its not really clear of whether or not this can be done today without implementing that RFC. I’ve also seen discussions on slack where some people were using ES classes a while back, so it sounds like it may be possible now (even without that RFC)
Yes, it already works. The remaining work before we switch all the docs and tell people to always use class syntax is mostly around designing and shipping replacements for all the dynamic APIs people use today inside extend
.
But you can already find working replacements in ember-decorators if you want to start trying then now. The docs there are pretty good.
2 Likes
A side note, @wycats /et. al. spent years on TC39 guiding ES6 classes with a goal of not only making them and embers compatible. But with a goal of them superseding embers, so that one day we can simply use the ones provided by the platform.
3 Likes