3 ms·
If you've been building complex web components for 4 years, hopefully by now you've realized you can actually pass _properties_ down to custom elements.
by passle 6y ago
If you've been building complex web components for 4 years, hopefully by now you've realized you can actually pass _properties_ down to custom elements.
- nojvek 6y agoYep, but now you have two ways of doing a thing. With attributes you have attributeChangedCallback, with props you have set prop functions. Attributes show up nice in dom explorer and make it easy to debug, props don’t. I could go deep into this, when you bring typescript into the equation for large apps, there are all sorts of tradeoffs to keep in mind.