Comment

Comment by _heimdall

In my experience web components got a bad wrap because it was never really clear what exactly they are. Are they the shadow DOM? Custom elements? Yes! And no

I very rarely use the shadow DOM APIs but really lean heavily into custom elements for simple lifecycle hooks. Similar to the example in this article, its really easy to server render the HTML and have a bit of JS hook on in the client.

The main downside is that there's no support for delaying the component, the custom element will be created and connected immediately.

parent _heimdall 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton