← Back to context

Comment by o_m

3 days ago

Why did you decide going old school using Alpine.js instead of using plain vanilla web components?

I did seriously consider it, but again that was about trying to solve the problem in the least opinionated way.

Which is also why I made the Alpine code as unobtrusive as possible.

You can get away with using purely the CSS if you don't need dialogs or combobox. And you can plug your own JS if you decide to do so.

However, I will definitely try and see if I can make a web components version as soon as I have some time.

Alpine is old school now?

  • I'd say anything new in 2025 that involves working with the DOM that doesn't use web component is a waste. Lately I have been porting some old JS libraries (7+ years old) that still are visually impressive to web components, and in my experience after porting some libraries there is about 30% fewer lines of code. Before web components there was so much work to get things up and running in the DOM. Alpine.js does this behind the scenes, but there isn't really a need for it anymore.

    • I've been using RiotJS when I need partial component support - wasn't an all-in thing like React ; and I thought HTMX and Alpine are also good for these partial upgrades. Maybe WebComponents are fully supported now? (I can't keep up)

      1 reply →