How we use Web Components at GitHub (2021)
github.blog
github.blog
There's two social factors I want to comment on about this.
Its weird, the webdev world has lost... culture. We had a time when http://ajaxian.com and other sites kept us super socially aware of what was happening & everyone was sharing & no one knew. We were all watching, learning, together. But now Everyone Is A React Developer (EIARD) and there are normative in-reach-solutions & there's much fewer gathering places & communities to exchange views & possibilities across.
I also think there's an incredibly short-sighted long-dwelling view that anything that doesn't take over & dominate in 5 years is toast. Everyone wants standards to show up & immediately succeed, but actual adoptions is incredibly laborious & slow, and that's just something we have never ever learned. We looked at the colossal growth of startups across the 2010's & let their success determine how much we believe in the techs they were using, and any tech that didn't have gangbusters success for launching billions dollar enterprises was ignored.
And to be fair, Web Components is both an amazing shift, but it's just a start. It has a huge growing-in period, which hopefully never really ends, unlike other technologies which have more direct fit & purpose: it's kind of obvious what area WebMIDI is generally for, it's kind of clear how CSS Containers get used. Web Components is a return to the best aspect of the web; a mechanism & hinge for low-level extensibility, while still having interoperability. Figuring how what new frameworks & libraries that can rise atop this make sense is huge long slow work, with a lot of futzing & casting about. That's ok. We haven't been used to slow builds like this, but we have highly undervalued the potential here. Github's Catalyst, and Youtube's own WebComponents work are both incredible testaments to how well things can work.
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.
<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: