3 ms·
React actually wasn't built for SPAs; Facebook built it for widgets on a server-rendered page. That is why it has no built in SPA features, like routing, data
by zdragnar 3y ago
React actually wasn't built for SPAs; Facebook built it for widgets on a server-rendered page.
That is why it has no built in SPA features, like routing, data management, data fetching or other batteries a SPA or PWA might want.
Conveniently, it provided a very nice set of primitive and composable APIs so that all of those features can be added on in a way that fits naturally, such as react-router and the rest of the ecosystem.
That's all driven by the community, not the "lighthouse", so to speak.
AngularJS likewise didn't require using the router, and in fact can just as easily run multiple instances on a single page. I haven't used Angular in years, so I don't know the story there. Same goes for Vue, but that's hardly backed by a "lighthouse".
I don't disagree that there's no use for HTMX or server rendering of html. Not everything needs to be a SPA. The problem is the argument is a whole lot less convincing when presented with a lot of incorrect facts