DEV Community

Cover image for Rich Harris Web Component Identity Crisis
Danny Engelman
Danny Engelman

Posted on

Rich Harris Web Component Identity Crisis

Rich Harris (Svelte) is really giving Web Components some attention now.

His latest crusade against Web Components is basically a rant against the standard behavior of the <template> tag (available since 2015, yes 15)

https://x.com/Rich_Harris/status/1844134732306792631

And when people try to explain to him this just is what the <template> does, he continues:


Use the standard any way you want

Like it or not this <template> has been around since 2015, and will be around for a long time.

I say, learn what it does, and doesn't, and use what is useful to you

I extended Rich his complaint into a playground to play with.

Here are two examples using both a <template> and a regular <div>

The whole point of a <template> is to be different, as it was for the past 9 years

If you don't want its behavior, use a <div>

Note how this blogpost was not about Custom Elements or shadowDOM

PS: @rich, calm down, this is not good for your health




Top comments (0)