Dan Romero
@dwr.eth
Curious if React folks here have strong thoughts on SSR vs. SPA?
16 replies
0 recast
0 reaction
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
@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
@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
@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
Andrew Judson
@judson
do you know if there is anyway to do this in Remix? or do you have to use Next.js
1 reply
0 recast
0 reaction