←back to thread

367 points lemonberry | 1 comments | | HN request time: 0.654s | source
Show context
verisimilidude ◴[] No.24641789[source]
Fully agree with the author.

My biggest complaint about web components is that I don’t see a lot of advantages over using React, Svelte, or some other JS library. The author hints at this: if I’m already committing to a big JS build process, why wouldn’t I reach for one of these more ergonomic JS tools? Warm fuzzies for trying to use open standards isn’t enough to convince most people to switch away from more popular JS solutions.

replies(4): >>24641859 #>>24641900 #>>24642049 #>>24644957 #
1. spankalee ◴[] No.24641859[source]
The benefit isn't warm fuzzies - it's interoperability: with other components, tools, the browser and devtools, other developers.

If you build an app with web components, even if you're using one specific helper library to do it, it makes it possible, easy even, to incrementally migrate to other libraries. You can migrate top-down, bottom-up, or even middle-out to other helper libraries and have a continuously working app. You can import and use another web component built with another library without being constrained to just the framework you chose.

You can even build an app with all web components, later decide you really don't like them and want to use only a framework and still easily incrementally migrate top down and not break the app.

This makes web components the much safer choice for large and long lived projects, and more flexible for projects of all sizes.