nuxt.jse-commercestrapiheadless-cmsjamstack

Which rendering mode to choose with Nuxt? SPA, SSR, SSG?


I'm still new to web dev and trying to build an Ecommerce app using Nuxt and Strapi as a CMS to enable the website owner (which in this case is also me) to easily add/edit/remove products.

I've found a lot of articles about this topic and got really confused. I learned about the term JAMstack and I really liked it but I don't think I fully comprehend it yet.

In a JAMstack article explaining a similar usecase of mine (ecommerce with strapi, nuxt, snipcart). I read that I have to build my frontend in SSG. On another article using Nuxt 2, a screenshot of creating the project shows that Universal mode is chosen.

My head is melting and don't really know which option is valid and if all of SPA/SSG/SSR can be implemented with headless cms and provide a jamstack app which one should i use. Should i use jamstack in the firstplace?


Solution

  • A few takeaways


    You can check this article, it's quite handy: https://web.dev/rendering-on-the-web/

    There is a nice image giving more details regarding this subject, with some actual Web Core Vitals (TTI, FCP, TTFB etc)...

    You can check the Rendering Patterns here too: https://www.patterns.dev/posts/


    On a simpler and more practical explanation point, you can also check those articles, they are pretty well written. It's about Next but most of the concepts are relevant to Nuxt too:

    Or any other article on the Web really.

    How to choose?

    Ask yourself:

    Cool thing

    Nuxt will soon support all of them at the same time: https://github.com/nuxt/framework/discussions/560