logoalt Hacker News

asdfsa32today at 12:32 PM3 repliesview on HN

Putting ReactJS or VueJS for a little interactivity is hardly the correct approach. It makes no sense to bring them in for "a little". What made React and React-like (Angular v2, Vue.js) frameworks stabilise is that they're about the right abstractions and everything else for managing dynamic html converges to about the same thing.


Replies

dsegotoday at 5:21 PM

Why not? You can have server side routing that returns the page and then react then takes over and hydrates a small part within the page or the complete page. A similar approach is used for the islands architecture, and you can even combine different frontend frameworks for maximum flexibility, e.g. developer preference. You can decide to load your frontend libraries lazily or as shared scripts so they are cached and only take up some bandwidth on initial load (a couple of kB minified and zipped).

sgttoday at 12:46 PM

In principle I agree that putting React or Vue in for a little interactivity is a bad approach, if the same can be achieved with Htmx, which it usually can.

However for some really complex mini apps, that's another story. But for the rest of those CRUD pages, you can go simple server side rendered.

show 1 reply
Exoristostoday at 5:22 PM

Astro then.