Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Increasingly, this is actually an argument in favor of vanilla web components.

The WC ecosystem has grown a lot, and one of the great things about native web components is that they can be consumed by most major frameworks at this point. There are also many mature component sets you can pick from, like shoelace, etc... you can mix and match components from different offerings, something that's not practical with React/Angular (for example).

I can use a select from Ionic, a breadcrumb from Shoelace, and a date picker from Lightning and it'll all just work.

Doing vanilla Javascript development doesn't mean "don't use any libraries" (well, it might to purists, but whatever) it means stick to using standards based technologies with libraries and accelerators.

For example, I use many of the techniques described by the site, but I prefer to use lit-html library (NOT lit framework) for rendering.

Sometimes I use the vaadin router for routing, sometimes the Ionic router, sometimes my home grown one.

I use a little library I wrote called ApplicationState for cross component shared state, because I don't like state being coupled to my DOM structure.

Sure, this requires a deeper understanding than "batteries included" frameworks, but the advantages outweigh the negatives IMHO.




If you use a bunch of libraries for routing, UI, authentication, the only thing thats left is the rendering.

And quite frankly I don't see why Id want to reinvent the wheel there.

{#each notes as note} {note.content} {/each

is exactly what Id want to implement for example if I were writing JS functionality to render a collection.

And Svelte for example doesnt restrict you from using vanilla JS whenever you want either


It's not reinventing the wheel, it's more like not putting snow chains on your wheel when it's summer.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: