A lot of misconceptions here.
Google is an AdTech company par excellence.
You don't need to do hacky URL tracking with SPAs. That's the point.
>Also, fewer server interactions means fewer opportunities to capture user behavior or affect it at the server level.
SPAs certainly do not have "fewer server interactions". What do you think an API call is?
"React" comes from "reactive web app", not "reaction to a competitor's product".
I work with SPAs with API calls every day. It definitely reduces the server interactions over computing everything on that side, and it gives fewer points of contact with the server about the user's behavior. For example, many clicks and other actions will not result in any server contact at all.
I'm aware that they call it "reactive" but I'll stick with my rationale. There is no way they would use a Google product like that.
An enterprise React app I am currently working with takes about 50 requests to fully render the app post-login. Switching to another view (no reload) takes another few dozen. That's a lot of "server interactions", pretty standard for SPAs, but YMMV.
Re:Htmx Is the Future
by traverseda on Friday May 05, 2023 @05:32PM
(#35835384)
I... don't believe you? Like looking at the network request of any SPA I've ever seen there's just tons of requests for even simple page loads. One for main content, one for profiles, one for comments, etc.
In theory stuff like graphql helps but in the reality I'm living in SPA's hit multiple endpoints to get render even simple pages.
Definitely true, and mine do also. It's a side effect of the migration to microservices and away from monolithic endpoints.
React was significantly better than Angular (version 1).
Please don't pretend it was merely NIH syndrome that led to its creation.
But that would suffice! Facebook does not use any platforms from people who might compete with them. Why would they?
Re:Htmx Is the Future
by withinboredom on Friday May 05, 2023 @01:39PM
(#35832588)
I mean, they also came out with 'flow' after MS came out with TypeScript... I def don't want to think it was NIH syndrome, but it smells fishy.
your timeline is a bit off. facebook had react in production (mid-late 11) less than a year after angularjs went public, open-sourced it 18-24 months later (early 13), then evan started working on vue a few months after that (mid 13) and released early the following year
Thank you. I stand corrected.
If anything, SPAs make metrics harder because they hide the real behavior of the page in local JS/TS code and don't surface as much or any information in the URL. Also, fewer server interactions means fewer opportunities to capture user behavior or affect it at the server level.