DEV Community

Discussion on: Why is React so Popular?

Collapse
 
quii profile image
Chris James

The assumption that sending a small amount of data first and then loading it on the client is great for optimising time to first byte. The problem is that's not the only metric you need to worry about.

a) You typically will need to download more JS, this can cost a lot
b) Once the JS is downloaded your client needs to interpret and execute it. That can be extremely costly depending on the device.

Thread Thread
 
nrabhiram profile image
Abhiram Reddy

Oh I see. So are there better alternatives?

Thread Thread
 
quii profile image
Chris James

Honestly it depends, there's nuance. There's nothing "wrong" with using react and SPAs and there's nothing wrong with just generating a HTML string server side and returning that. It depends entirely on your use cases and systems.

I would say a lot of people are writing SPAs (with all the complexity it brings) and they probably don't need to.

I guess my overall point is you can't make blanket statements like your article says like "react is fast".

Thread Thread
 
nrabhiram profile image
Abhiram Reddy • Edited

Oh okay I totally get you. Thanks for the clarification. I was misinformed about this. I'll edit the post a little. Cheers!