Up until a few months ago, choosing between NextJS and Gatsby was easy. Need to make a static site, like for a blog or help page where the content doesn’t change too often? Cool, choose Gatsby. Need to build a site with server-side rendering, like an e-commerce store with thousands of items? Great, NextJS it is.
With the release of NextJS 9.3, the lines have blurred. NextJS now supports next-generation static site generation. Using the new build time methods
getStaticPaths, users can create static sites, just like Gatsby.
So the question is: if NextJS can do everything that Gatsby can do, but Gatsby can’t do everything that NextJS can do, why choose Gatsby at all?
Let’s take a look and the strengths and weaknesses of both Gatsby and NextJs, and finally, make some recommendations of what you should use for your next project.