What’s the Problem with Client-Side React Apps?
The big advantage of single-page applications (SPAs) and client-side React is that you can build highly reactive and interactive web UIs. The UI can be updated almost instantly, visible page reloads and switches can be avoided, and hence your users benefit from a mobile-app-like user experience.
But this reliance on client-side code (and, therefore, JavaScript) also has potential disadvantages:
- If users disable JavaScript, the website will be pretty much unusable.
- The initially fetched HTML document is almost empty—data fetching and content rendering only take place after that initial HTTP request and response.
The first point might not matter too much, since only a small subset of all users will disable JavaScript and you can show an appropriate warning message via the <noscript>
tag.
But the second point can have significant consequences. Since the initial HTML document is almost...