Dan Romero pfp
Dan Romero
@dwr.eth
Curious if React folks here have strong thoughts on SSR vs. SPA?
16 replies
0 recast
0 reaction

David Furlong pfp
David Furlong
@df
Right up my alley 1/ Initial page load html should probably always be from SSR/ISR/SSG because it's considerably faster than sending 150kb+ JS client bundles that need to be downloaded and run. For SEO one of SSR/ISR/SSG is crucial as well as most crawlers in practice don't wait on CSR
2 replies
0 recast
0 reaction

David Furlong pfp
David Furlong
@df
2/ Once the initial page load has been done on the server, hydrated to the client, and the user presses a link, navigation can be done either client side or server side again. Here it's a closer call & there is some allure in the simplicity of server side like remix does.
1 reply
0 recast
0 reaction

David Furlong pfp
David Furlong
@df
3/ Client side navigation is generally faster (https://nextjs.org/learn/basics/navigate-between-pages/client-side) and allows for transition animations and not introduce user input delay on navigation. With newer tech like prefetching and bundle chunk splitting, client side navigation is just getting better & better
2 replies
0 recast
0 reaction

David Furlong pfp
David Furlong
@df
4/ However working on a SPA is more complex (more states to reason about) and more things to optimize for. I think Next.js is currently the best way to build and deliver the right SPA/SSR/ISR/SSG hybrid, but I think there are also compelling arguments for the way Remix does things
1 reply
0 recast
0 reaction

David Furlong pfp
David Furlong
@df
5/ So I guess my answer is SSR and SPA and ISR (Incremental static regeneration) and SSG (static site generation) and FCR. Okay I made that last one up ๐Ÿ˜‚
0 reply
0 recast
0 reaction