DEV Community

Discussion on: We Should Stop Hating Web Components

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

The collection of APIs we often call "web components" aren't really supposed to be a finished product; they provide low-level access to browser features that let you do almost everything you need, but at the expense of making the most common cases more cumbersome than necessary.

The point is that these APIs make it much easier to build your own declarative systems without having to bother re-implementing too many of the same features every time.

I personally don't even like frameworks like Vue or Svelte too much, because they're a bit too declarative for my taste, meaning I give up control over how data flows through the application. With web components I can build my own micro-framework with like 50 lines of code and continue building stuff on top of that instead.

Collapse
 
theharshsingh profile image
Harsh Singh

Yes Web Components were meant to be used in that way. You can either write your web components using vanilla js or you can use a collection of tiny helper libraries for performing different functions like routing and state management. and its not like there are no libraries available out there. there are over a dozen libraries just for adding the routing functionality in web components, but they are all either badly documented or lack any support from the community. i urge the Web Component community to come forward and start helping the newcommers and do more than being a Symbolic entity.