r/javascript • • Dec 14 '17

Netflix functions without client-side React, and it's a good thing

https://jakearchibald.com/2017/netflix-and-react/
21 Upvotes

13 comments sorted by

36

u/Investisseur Dec 14 '17

So they still use React just don't load all of the React code bundles immediately

23

u/addiktion Dec 14 '17

aka code splitting.

34

u/Investisseur Dec 14 '17

Yep. Pretty shit article

10

u/addiktion Dec 14 '17

Thanks for saving me a click. I backed out after reading your comment. Any big company not doing code splitting and using webpack is clearly falling behind in the performance department.

3

u/nvolker Dec 14 '17

Jake Archibald’s stuff is pretty good. The title for this article was just a bit clickbaity; the article is good, but it’s not exactly what the title makes it seem like it’s going to be.

12

u/z3dtech Dec 14 '17

No the article is good, just the title is clickbaity. The article actually says exactly this.

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.

2

u/[deleted] Dec 14 '17

They are using React server side but it is not in the code bundle taking the page to an interactive state: https://mobile.twitter.com/netflixuie/status/923374215041912833

4

u/tehoreoz Dec 14 '17

that talk is about their home page when you aren't logged in

19

u/masterco Dec 14 '17

Clickbait title.

2

u/Birdy58033 Dec 14 '17

If it's a complicated app like page, i highly prefer if it loads all the parts before allowing a user to interact.

2

u/rotzak Dec 14 '17

Never mind networks and computers are faster than they’ve ever been and will continue to be so. Somewhat ironically, the engineering overhead in using your stack to serve pretenders HTML is actually probably more significant than just serving an SPA at this point.

1

u/Apfelmann Dec 14 '17

"Most frameworks now offer some sort of server-rendering feature" uhm not very long ago the web was being rendered server side only

13

u/the_argus Dec 14 '17

Not very long ago the web wasn't rendered server side via Javascript which is what people mean when they say that. The reason for doing so is to share code between the server and frontend.