Hacker News new | past | comments | ask | show | jobs | submit login

Between react and vue, which is better suited for adding dynamic components here and there to a server-side-render html webapp?



If you're choosing between those two, then I find Vue still better at this than react, where you have to go full JS rendering. Vue 2 had inline-template support which allowed progressive enchantment of HTML. Vue 3 however dropped support for that (there are few workarounds).

All in all both frameworks aren't too great at sprinkling dynamic functionality on server-side rendered HTML.


FWIW, just found this https://github.com/vuejs/petite-vue while skimming vue's website.

Why do you think they are not great at this?


If we consider Vue 3 and React - they are not great at progressive enhancement because they are not built for that purpose if you're not using corresponding server-side renderer. If your backend return simple HTML - there's no way to mount Vue3 or React on top of that HTML and be sure that it won't be fully replaced by JS-rendered HTML because it has small differences between them.

Vue-Petite is definitely interesting and I likely will use it in the future, but talking strictly about Vue 3 and React - they are more suitable to SPAs than to progressively enhance your HTML.




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

Search: