3 ms·
I'm a big fan of web components, too, and they have transformed the way I do development for work and personal projects. This article mentions and recommends t
by dtagames 4y ago
I'm a big fan of web components, too, and they have transformed the way I do development for work and personal projects.
This article mentions and recommends their own "Catalyst" light scaffolding for events and the component lifecycle, saying it was inspired by Lit.
Looking at Catalyst, I can't see why it would be needed. Just use Lit. It provides decorators for HTML and CSS and easy wiring for events and the component lifecyle. There's no need to add Catalyst and the author did nothing to explain why didn't they just run with Lit.
- LAC-Tech 4y agoInterested to hear more. There's lots of stuff out there on the mechanics of web components and less about how to actually use them. What I can't wrap my head around is how to use them to render complex data when you can only pass strings into attributes.
- dtagames 4y agoNot true! You can pass any object. In Lit, just put a dot before the attribute name: <my-component .array=${[1,2,3]} .object=${{this: that, another}} .var=${mySomething}></my-component> I did a series on Medium. Maybe one of these would be of help to you: https://link.medium.com/HNhigMgvAxb https://link.medium.com/HNhigMgvAxb https://link.medium.com/TNiNHDkvAxb https://link.medium.com/TNiNHDkvAxb