3 ms·
Is it possible to have all pages rendered server side?
by deegles 10y ago
Is it possible to have all pages rendered server side?
- mikeryan 10y agoare you asking to have a static site pre-built from React? I'd assume when he says "first page" he means any first page but generally from there the rest becomes dynamic react. Depending on how you load your data it should be much quicker to render entirely in the browser once the page has loaded.
- deegles 10y agoWell, I was thinking you could have all pages server-side rendered in the case of a low-power mobile device, and leave the hybrid approach for desktop browsers. The user-agent string could be used to decide which approach to use.
- AShedOfTools 10y agoYep, this is the case
- AShedOfTools 10y agoAll pages are rendered server-side by default. React Server sends each server-side rendered element as soon as it, and every element before it, are ready, up to a timeout, at which point it sends the late arrivals as they trail in. On the client side, React Server picks up where the server left off, to render client side code as the user interacts with the page.