2 ms·
What they've done makes complete sense, and is probably the way more developers should start looking at SPAs. The initial page load doesn't use React. It doesn
by jmknoll 9y ago
What they've done makes complete sense, and is probably the way more developers should start looking at SPAs.
The initial page load doesn't use React. It doesn't need it. Its a pretty simple page with a bunch of links and a couple of signup/signin buttons. Once you click one of these links, the subsequent pages load React in order to handle the richer client-side interactions on those pages.
Seems reasonable. React allows for a better User Experience than static pages, but at the cost of additional load time. So don't load it on the first page, when your users are most likely to bail, and then load it once you need it.
Maybe we're starting to see the pendulum swing back the other way. 3 or 4 years ago, we seemed to go from 'SPA Nowhere' to 'SPA Everywhere,' and now maybe we're settling on 'SPA Where We Need It'
- timrichard 9y agoCall me cynical, but I've a feeling that "SPA Where We Need It" would creep into being the static pages plus more and more snippets of jQuery scattered around as time went on, to "just make it do this....". Projects go that way. In other words, back to the bad old days with swathes of unstructured frontend spaghetti. Walked into a lot of those codebases on contracts.