8
8 Comments

Is Gatsby suitable for web apps other than blogs or truly static websites? I'm deliberating over Gatsby vs Next.js and their pros and cons.

From an indie hacker perspective where I find it vital to get started quickly, Gatsby seems like an easier and faster choice than Next.js. However Gatsby of course has limitations as a static site generator rather than rendering some content dynamically.

I wanted to know if someone in the indie hacker community has experience regarding this and what insights they learnt. If I have a small SaaS app with a simple user dashboard for some configuration and monitoring, and any auth solution then would Gatsby be a better option? Any challenges I should be wary of?

posted to Icon for group Developers
Developers
on January 2, 2020
  1. 3

    Gatsby can definitely do more. Static assets do not mean static sites.
    I built a course platform based on Gatsby and Contentful https://howtocontentful.com/
    I've been very loud about using Gatsby as a create react app alternative, I am working on a course https://learnjamstack.com/migrate-a-reactjs-project-to-gatsby/ .

    TLDr; Gastby gives you HTML to start with but it rehydrates itself into a fully-fledged React app.

    Gatsby also has a concept called themes https://www.gatsbyjs.org/docs/themes/what-are-gatsby-themes/ which will allow you to split your functionality into different packages like a shop, marketing website etc...

    Here are a few example apps using Gatsby:

  2. 2

    Gatsby is not just a static site generator, and it's capable of much more than just blogs. New features that are coming soon will make it even more flexible.
    https://www.reddit.com/r/gatsbyjs/comments/ejdbkh/gatsby_queries_20_usequery_with_variables_and/

    I also agree that Gatsby should be used as a create react app alternative. One of the best features of Gatsby is that its optimized for speed and SEO. However to make it a truly dynamic site will require extra work and Next.js might be an easier alternative.

    T2 Media
    https://www.t2.ca

  3. 2

    Gatsby messed up their marketing with the "static site generator" line, because it made it seem like Gatsby couldn't be used for dynamic or interactive sites, which it can be. Essentially, as much static content as possible is preloaded so it's delivered faster, while dynamic content is loaded as required by the client.

    I believed the same thing as you until I listened to the "Gatsby with Kyle Mathews and Sam Bhagat" Software Engineering Daily podcast episode, which explains what static means it terms of Gatsby.

  4. 1

    I don't have much experience with Next.js but I've been playing around with Gatsby lately and I quite like it. Not sure if I'm ready to deploy a client website with Gatsby yet since Craft CMS preview does not work until the page is published. I did not try it with WordPress yet.

    I've listed to Syntax FM Podcast with Scott and Wes and they have a pretty good explanation of the differences -> https://syntax.fm/show/120/gatsby-vs-next

  5. 1

    I don’t have any experience with Gatsby, so I couldn’t give you a comparison point.

    I will say that Next.js is super easy to get up and going.

    I’ve built three sites (a mini-course, a blog, and a landing page) in the past 30 days and am well into my 4th. The fourth will be a Next.js/Bootstrap starter kit for creating SaaS apps. It’s configured for JS, TS, and MD out of the box and will have page templates for a variety of common SaaS use cases. Details if you’re interested at https://excelerant.pro

    1. 3

      I've only gone through the basics tutorial for Next.js (and also started my blog in Gatsby). In my mind they are very similar, except Next.js requires you to run a node process but is set up for server-side rendering and code splitting out of the box. With Gatsby I can generate the static site files and throw them into an AWS S3 bucket to have a website without having to set up a server. So if I'm already going to have to run a server to host an API then I'll probably use Next.js. Otherwise I'll probably use Gatsby.

      1. 1

        I think that’s a great way to make a distinction!

Trending on Indie Hackers
I built a WhatsApp AI bot for doctors in Peru — launched 3 weeks ago, 0 paying customers, and stuck waiting for Meta to approve my app User Avatar 52 comments Fixing broken scrapers instead of working on my actual product. So I made it my problem. User Avatar 44 comments I built an open-source PII masking layer for LLM APIs — early traction, looking for design partners User Avatar 33 comments How to see revenue problems before they get worse User Avatar 29 comments From broke and burned out as a PM, to launching my SaaS and optimizing my health User Avatar 27 comments I kept starting projects and dropping them. So I built a system that wouldn’t let me User Avatar 23 comments