3 ms·
The whole idea of SPAs is just unfortunate most of the time. If you look at the list of the most popular websites: https://en.wikipedia.org/wiki/List_of_most-v
by torginus 2mo ago
The whole idea of SPAs is just unfortunate most of the time. If you look at the list of the most popular websites:
https://en.wikipedia.org/wiki/List_of_most-visited_websites https://en.wikipedia.org/wiki/List_of_most-visited_websites
Basically all of them can be decomposed to:
- List of comments/recommendations/pictures (sometimes in a tree), virtualized and lazy loaded
- A video
- A comment box
The irony is that this is super easy to represent in HTML semantically (HTML was literally made for this).
The 'virtualized and lazy loaded' part should've been a HTML standard (or more generally, partial page updates, like when you submit a comment) and then we'd have basically very little reason to do Javascript at all.
The irony of React is that what it does is make a mess of HTML, and allows you to ship your own semantic model in JSON/JS which will then get unpacked on the client into some display HTML.
This is accentuated by the fact that React's support for virtualization is really quite poor, as it assumes that you have the 'state' in RAM, and you have to go out of way to use third party libs that can handle both partial state and partial display.
Edit:
Apparently I'm not the only one who thinks this, and Chrome/W3C seems to experimenting with something similar:
https://developer.chrome.com/blog/declarative-partial-updates https://developer.chrome.com/blog/declarative-partial-update...
But this should've been a W3C standard in like 1999.
- Scarblac 2mo agoAs usual this discussion is people talking past each other because some people work on web sites and others on web applications. React is great for applications, perhaps not as much for sites. I wouldn't know though.
- jakelazaroff 2mo agoI have no idea where this meme comes from. They're all just websites! Plenty of "web applications" make more sense as server-rendered Django or Phoenix apps than they do client-rendered React apps.