DEV Community

Discussion on: Stop Using React? But Why??

Collapse
 
albertochiesa profile image
Alberto Chiesa

All I can see is a lot of confusion.

About what's the problem, what's the range of available solutions, but, more importantly, what is the objective.

Do we want to build enterprise-type applications (mostly forms)? Applications with rich UI? Content-centric websites (think a news site)? Almost static web sites with just a bit of interactive contents?

If you need to build an application, you build an SPA. If you need to build an SPA, you use a framework. Pick the one you prefer. End of story.
A long lived application has NOT startup time as one of its priorities, and it shouldn't. It's a nice to have, but that's it.
If you need a content-centric website/app, you have the most choice. While it is true you could take React and build it just like an app, probably you want to make use of a static site generator.
If you need a static website, make one.

When someone clicks a link/an icon/whatever to open our application, a bunch of stuff happens:
1 - you browser calls the server
2 - the server reads (one file at a time, with some parallelism) from disk or cache (every decent server or OS will cache accessed files in memory)
3 - the file(s) are transferred over the wire/WiFi
4 - the page is rendered, in a multi step process. Usually first css+html, then js gets evaluated.

We want to minimize the total time. We cannot do much about 1.
2 it's taken care by our server/proxy. Something like NGINX can be fast, while still being easy enough to setup.
We should minimize the total size of the page+assets, if 3 and 4 are a concern.
Also, using static site generation, 3 and 4 can drastically improve.

This article merges a provocative title with no reasoning and a "solution" which is not related to the "problem".

No, thanks.