by nisten · 7y ago · 0 comments
React with well defined static content routing and server-side rendering is amazing at this because the first packets that the server sends the user is html/css jumble.
You can get your app to show text and formatting in as little as 20ms(depending on where you deploy it), then show images, then you don't care if the rest of App and all the js and 3rd party crap take another 2.5s and 3mb to load, The user will do a bit of reading and picture watching, before using a button or input field. However if they're on the go and loose connection, now they have a fully functional back button in their browser to read the next or previous cached html/css content.
We've been "server side rendering" since the inception of the internet.
If you build your pages with CSS at the top and JS at the bottom you're already achieving most of that effect right there, no extra tools needed.
The browser will load the css and content first, and then process the JS requests (Which are easily cachable by the server AND the browser).
There's nothing new or especially special about "server side rendering", and nothing about React rendering either.
Rendering on the server lets you do whatever you want.
Want to put the user in a specific state? Sure, go for it.
Want to use a starter or null-state? Sure, go for it.