4 ms·
So Netflix homepage, not signed in, has no React. It is the page that doesn't even need React. If you are signed in, then you will not see Netflix landing page
by kalcode 9y ago
So Netflix homepage, not signed in, has no React. It is the page that doesn't even need React.
If you are signed in, then you will not see Netflix landing page and go straight to their app which has React.
I feel people are misunderstanding what Netflix meant in their tweet.
- shervinafshar 9y agoReading the post helps address a misunderstanding about misunderstandings: >> Netflix uses React on the client and server, but they identified that the client-side portion wasn't needed for the first interaction, so they leaned on what the browser can already do, and deferred client-side React. The story isn't that they're abandoning React, it's that they're able to defer it on the client until it's was needed. React folks should be championing this as a feature.
- nerdwaller 9y agoI’m not sure I would consider this a feature. It’s just a trade off like anything else. If the page is blank on load for >2s, I’m gone. Similarly if the page is unresponsive for >2s I’m gone (even if it painted in that period). Netflix doesn’t necessarily have this issue because the general population knows what they provide, but generally speaking it’s 6 of one, half dozen of the other.
- derefr 9y agoNeither of these are true of Netflix’s home page, though. They’re not deferring React and thus causing unresponsivity; they’re deferring React and handling the interactions on the home page using server-side rendering and regular JavaScript event handlers. React is loaded in the background so that it can be there when you log in and thus load the “app” part of Netflix; not so that it can “kick in” after 2s to drive the homepage.
- jmknoll 9y agoWhat 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.
- cvsh 9y agoA headline like "Netflix functions without client-side React" is certainly not helping the confusion.