HACKER Q&A
📣 davidatbu

What is JAMStack? How is it different from SPAs with SSR, if at all?


To clarify the question in the title:

1. This[0] is what I mean by JAMStack. 2. "SPA" refers to single-page-app. 3. "SSR" refers to server-side-rendering.

[0] http://jamstack.wtf


  👤 cabraca Accepted Answer ✓
JAMStack is the fancy term netlify introduced. Most of the time its just a static site generator like gohugo.io with a bit js and apis sprinkled into. So instead of rendering the page at request time, its rendered before deployment, deployed as static html with the js part managing the dynamic parts like stripe, apis, etc.

👤 Parker_Powell
The JAMStack (JavaScript, APIs, and Markup) is a web architecture that was born out of the need for faster development and better performance. A JAMStack site/application is designed to be as fast as possible, and to be built with a wide variety of different technologies--which makes it easier for developers to build sites without having spent years learning a certain technology.

One of the main differences between JAMStack and SPAs with SSR (Single-page applications with server-side rendering) is that JAMStack sites are pre-rendered rather than rendered on the fly by servers. This means that they can't use any dynamic content on the page—everything must be done when the page is pre-rendered. This makes them much faster since they don't have to make requests to servers in order to render pages after they're loaded in the browser.

That doesn't mean you can't use dynamic content on your site, though! You just need to pull it in after your app loads using APIs. That way you get the best of both worlds: a fast-loading site that pulls in dynamic data when it needs to through APIs.