To `attrs` or not to `attrs`
The advice to avoid
attrsis still relevant as of Ember 2.12, and until angle bracket components are released in Ember.
In this post I will attempt to explain why you should avoid using
attrs in your Ember.js application code.
attrs is a Glimmer Component thing, and Glimmer Components haven’t landed on stable Ember.js yet.
First, a bit of background on why
attrs appeared. Currently we have a kind of component that is invoked with handlebars (curly braces), like this:
These have been around for a while, so for the sake of distinction we’ll call them Classic Components. Then, in the much mentioned Road to Ember 2.0 RFC and related blog post, a new kind of component was introduced that uses HTML-like invocation, like so:
Previously slated to land on the 1.x series, it has been postponed until some serious flaws are addressed
Continue reading →