Re:New React docs pretend SPAs don't exist anymore
by eurasiantiger on Saturday March 18, 2023 @09:18AM
(#35208876)
Next.js can also do Gatsby-like static generation, but also update those generated pages if the content changes in the backend. They call it incremental static regeneration (ISR).
They are basically delivered as SPAs, with an integrated, isomorphic backend-for-frontend service embedded in the origin server.
They just don't feel like SPAs, because they have a multipage (routing) framework, and isomorphic rendering means those paths can be directly loaded from the server - while any subsequent navigation just updates your UI clientside.
In the case of static conteent-based sites, that SSR can even be done ahead of time, as a static built-time render, and the pieces of data needed to load different pieces of content into the SPA ('pages') get dumped out as static JSON resources. That's what Gatsby offers particularly as its specialty versus next.js.