r/reactjs • • Oct 27 '17

Removing client-side React.js (but keeping it on the server) resulted in a 50% performance improvement on our landing page (Netflix)

https://twitter.com/NetflixUIE/status/923374215041912833
28 Upvotes

11 comments sorted by

2

u/darrenturn90 Oct 27 '17

I wonder what would happen if instead of ditching react, the react part was served from a CDN, presumably already cached in the browser and not needing to be reloaded every time?

4

u/renfieldist Oct 27 '17

I get the impression it’s not so much about network lag as about how long it takes to rehydrate the page vs just serving the finished page.

2

u/StyleIsFree Oct 27 '17

What does it mean by keeping react on the server?

5

u/renfieldist Oct 27 '17

Server-side rendering. React runs, but on the server, and the client browser downloads the result.

1

u/siamthailand Nov 07 '17

Sooooooooo, PHP?

0

u/[deleted] Oct 27 '17

[deleted]

6

u/ajc820 Oct 28 '17

As they elaborate on HackerNews it's not really a static page. The problem with drawing conclusions from this presentation is that it's very unique to the scale of Netflix. The vast majority of companies would benefit investing development time in functionality etc. long before this kind of optimization.

Perf matters, as has been demonstrated in the e-commerce realm multiple times. But you still need a product to tune performance of, in the first place. I'm sure a lot of teams using React don't actually need the entire codebase (hello Preact), you absolutely could build a raw vanilla-JS codebase specifically for your product's (highly dynamic) landing page ...but the cost/benefit doesn't make sense until you're near Netflix's position, and even then they're still using React server side.

1

u/[deleted] Oct 29 '17

100%. Have an up vote.

0

u/[deleted] Oct 27 '17

[deleted]

1

u/incarnatethegreat Oct 28 '17

This news is sure gonna shake things up, by golly!