| ▲ | user34283 3 days ago | ||||||||||||||||
If you static render, it won't be an interactive application. With React SSR you get the best of both: stream static HTML chunks immediately, and rehydrate with JS later, prioritizing components the user interacts with. It should load quicker compared to traditional React apps where the browser loads the HTML, then loads the JS bundle, and only then renders a loading skeleton while likely triggering more requests for data. | |||||||||||||||||
| ▲ | zarzavat 3 days ago | parent | next [-] | ||||||||||||||||
> It should load quicker compared to traditional React apps where the browser loads the HTML, then loads the JS bundle, and only then renders a loading skeleton while likely triggering more requests for data. Then your JS bundle is broken. Promises exist. Modules exist. HTTP/2+ exists. You can load data while you are loading a small amount of JS required to render that data while you are loading other parts of your JS. If everything is sequential: load giant JS bundle -> fetch -> render, that's because someone architected it like that. Browsers give you all the tools you need to load in parallel, if you don't use them then it's not the browser's fault. You do not need SSR or rehydration. That's just Vercel propaganda. They saw that people are doing a stupid thing and decided to push a complex solution to it. Why? It makes them money. | |||||||||||||||||
| |||||||||||||||||
| ▲ | sublinear 3 days ago | parent | prev | next [-] | ||||||||||||||||
Static rendering has nothing to do with interactivity in a web app. I guess if you're already so deeply entrenched in writing all your application logic on the server side you need React SSR, but that sounds miserable. | |||||||||||||||||
| ▲ | DrammBA 3 days ago | parent | prev [-] | ||||||||||||||||
You seem to be confused about your terms, both SSR and SSG can rehydrate and become interactive, you only need SSR if you have personalized content that must be fetched on an actual user request, and with frameworks like astro introducing island concept it even let's you mix SSG and SSR content on a single page. | |||||||||||||||||
| |||||||||||||||||