I was just introduced to a great use case for #reactjs Suspense in server side rendering.
You can suspend on client side only data like browser width and height. Your server would send a loading state while your client code calculates the proper size.
So basically I request the page (comes with a tiny bit of js that grabs the window size), sends that info to the server, server renders the page and returns to the client?
Oct 17, 2018 路 8:57 AM UTC
Nope. You request the page which sends down the entire JS bundle. React mounts with a loading spinner while the code which requires client side state executes in the background.
Once everything has loaded the full page appears.
1
1

