Sacra Logo

What distinguishes static site generators like Gatsby from JavaScript frameworks like React, and how does Next.js fit in?

Anonymous

Jamstack agency founder

This is not something that I have a whole lot of experience getting really deep into. Gatsby seems to have really extensive tooling around that particular use case. When I've looked at it, it just seems like that's their focus: building hundreds or thousands of pages statically, even to the point where a page is implemented with techniques that are really centered around that use case. There's a GraphQL layer there that is intended to be used throughout your app. Stuff that I wouldn't think to do if I was just building an app without any of these technologies or services. It seems very much like, “This is the Gatsby way.” And then there's an overwhelming number of plugins and all kinds of things that have grown out of that whole focus, that for me is kind of an afterthought.

Like I mentioned, I just want to make my app the same way that I would if I was working with Create React App, just simple components. They're in a file, and it doesn't look any different than Create React App would. It's only by the defaults of Next.js that it happens to be deployed a certain way. Then if I want it to be deployed a different way, it's this tiny little API surface where I just have a couple of options to choose from. It's not overwhelming. It's just one little tweak here, and boom, now my app is rendered and deployed in a totally different paradigm.

I guess if your site is one that has that model of thousands of pages, and you want to build all of them statically -- maybe I don't know enough to say whether or not Gatsby has meaningful differentiation there. Maybe it does. But for me, I want all my pages to be rendered statically. Vercel refers to it as automatic static optimization. That’s the common use case for me. I guess it must just boil down to the priorities of each app.

Find this answer in Jamstack agency founder on the rise of Next.js and Vercel
lightningbolt_icon Unlocked Report