DEV Community

Ilia Mikhailov
Ilia Mikhailov

Posted on

SPA vs SSR use cases?

I can't quite wrap my head around when to build an app as a pure SPA and when it's better to use an SSR framework like Next.js, Nuxt.js, Sapper.

It's clear that it makes no sense to use an SSR framework for building a todo app, as it makes no sense to build your blog as pure SPA, or maybe there is? This is the thing. It feels that there is a gray area on when to use what.

If you look at the Next.js website it feels like they mostly showcase heavy media sites as examples, but what about other apps? If we take Dropbox Paper as an example, which approach would be the best to use for building an app like that?

Let's also rule out the SEO factor here as it doesn't apply to the app like Dropbox Paper, where most of the content is private.

Educate me! Give me your thoughts and personal stories. Show me what you have built using an SSR or SPA framework and please state the reasons behind your technology choices.

Top comments (2)

Collapse
 
serchavalos profile image
Sergio Avalos

Some of the cases I would think of are:

  • Improved perceived performance by rendering some of the critical visual elements (i.e loading a jumbotron image compared to a loading GIF)

  • Support for old browsers or markets with slow connections. Similar to what Facebook has done with mbasic.facebook.com

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt

I would use pure Vue CLI with hash router if

  • No social links
  • No SEO score

However, IRL, because of social links, at the very least. I usually have to use SSR or SSG.