Hacker News new | ask | show | jobs
by 123yawaworht456 643 days ago
~90% of SPAs could be static HTML with a few kilobytes of vanilla JS sprinkled in for AJAX.
2 comments

Why? The whole thread is about how keeping it simple is supposedly better. Using react when you know react is easier than static html+ajax. It handles a lot of stuff for you and you can then use the incredibly rich react ecosystem for everything else (authentification, forms). Even a pretty basic web app usually requires those, so again, it's simpler to just use react and it adds basically no overhead for a react dev.

Plus, the big issues with react usually only manifest themselves in larger web apps, so it's basically "perfect" for simple stuff. You could make a functional react page in a single file in a few hours.

And they could also be react apps. What's your point? For a lot of people, a suitable react app is easier to make than the equivalent static HTML page with vanilla JS. The "it should be static HTML with a sprinkle of JS so the filesize is extra small!" guy is the one overengineering, here. The SPA's 20 customers are all using modern web browsers on modern first-world internet connections and don't care or notice that the page is not Stallman-approved.
Stallman-approved pages will happily welcome any and all users visiting your site. Modern SPAs maybe not so much due to the overengineering and mostly unnecessary features.