logo
episode-header-image
About this episode

In this episode of Syntax, Scott and Wes talk about Gatsby vs Next. A lot has changed in the last year — what are the differences, and do the recommendations from Syntax 120 still hold true?

Sanity - Sponsor

Sanity.io is a real-time headless CMS with a fully customizable Content Studio built in React. Get a Sanity powered site up and running in minutes at sanity.io/create. Get an awesome supercharged free developer plan on sanity.io/syntax.

Sentry - Sponsor

If you want to know what’s happening with your errors, track them with Sentry. Sentry is open-source error tracking that helps developers monitor and fix crashes in real time. Cut your time on error resolution from five hours to five minutes. It works with any language and integrates with dozens of other services. Syntax listeners can get two months for free by visiting Sentry.io and using the coupon code “tastytreat”.

Show Notes

03:34 - Server-rendered

  • Both do server rendered
  • Gatsby is gone at build time
  • Next is done at build and on deploy

05:26 - Static generation

  • getStaticProps()
  • getServerSideProps()

08:25 - Re-rendering pages

  • Gatsby can be re-rendered and re-deployed - any CMS lets you do this on only the pages that changed.
  • Gatsby-cloud
  • Next.js has the revalidate flag that will re-render when stale

18:54 - Data management

  • Gatsby has a built in GraphQL API feature with
  • Next.js has nothing - it’s not their problem. Use Apollo, or SWR, React Query, or redux, or whatever you want.

23:16 - Client-side data

  • Neither do anything, next.

26:33 - Dynamic Pages

  • List of 100 shoes, each one gets a page
  • List of four types of shoes: basketball, runners, casual, bowling, etc.
  • List of 10 colors: each color gets its own page.
  • List of 12 sizes, each size gets its own page.
  • Now it gets complicated when you do this:
    • Show me basketball shoes, in red, in size 5
    • 600 pages minimum
    • What about size 6+7?
    • Then you get into having to fetch data on the client side - but all your data is in GraphQL?!
    • The queries are different!
  • Gatsby will get “Hosted GraphQL”: https://twitter.com/kylemathews/status/1252803849775009794

30:41 - Routing

  • Neither do nested routing still
  • Both do folder based wrapper

34:50 - Hosting

  • Anywhere

35:54 - Images

46:20 - Server or Serverless

  • Gatsby - none. You can do it with Netlify, Begin, AWS, Gatsby doesn’t care.
  • Next.js - can do server with API routes. Can do serverless if you host on Vercel.

49:44 - SEO

  • Tags
    • Gatsby - Helmet
    • Next - Head
  • Sitemap
    • Plugin for both

49:55 - Plugin Ecosystem

  • Gatsby has lots of plugins that you install
  • Next.js has some too. Seems Gatsby is easier in this regard because plugins can manage and normalize data into the GRaphQL Layer.

53:10 - Auth

55:00 - E-commerce

  • Gatsby - options are mostly limited to Snipcart and Shopify like iframe drop in solutions where the majority of operations take place on another site and service.
  • Next.js - hey released a starter boilerplate that leans on an existing headless cart
  • https://rainierwatch.com/

Links

××× SIIIIICK ××× PIIIICKS ×××

Shameless Plugs

Tweet us your tasty treats!

Up next
Yesterday
918: Extreme Native Perf on the Web with Superhuman
Wes and Scott talk with Loïc Houssier about how Superhuman builds lightning-fast, delightfully-designed email software. They dig into engineering philosophy, offline-first architecture, local databases, AI-powered productivity, and what it takes to create tools that people love. ... Show More
48m 54s
Jul 7
917: AI Tools You Should Know
Scott and Wes round up the hottest AI tools you should have on your radar; from text-to-speech wizards to self-hosted image generators. They break down what they’re using, what’s worth paying for, and which tools are changing their workflows. Show Notes 00:00 Welcome to Syntax! 0 ... Show More
37m 48s
Jul 2
916: I got fired, what should I focus on?
In this potluck episode of Syntax, Wes and Scott answer your questions about maintaining popular open-source projects, where to start after a layoff, impostor syndrome, Scott’s recording setup, whether a computer science degree is still worth it in the age of AI, and more! Show N ... Show More
58m 24s
Recommended Episodes
Jul 2020
"GraphQL is the bacon that'll make everything better" (JS Party #134)
KBall, Jerod, and Nick Nisi dive into GraphQL – what it can do, what the challenges are, and how it differs from REST – all with a generous helping of metaphor about buffets, restaurants, and of course bacon. Discuss on Changelog News Changelog++ members support our work, get clo ... Show More
54m 13s
Jul 2020
"GraphQL is the bacon that'll make everything better"
KBall, Jerod, and Nick Nisi dive into GraphQL – what it can do, what the challenges are, and how it differs from REST – all with a generous helping of metaphor about buffets, restaurants, and of course bacon. Discuss on Changelog News Changelog++ members support our work, get clo ... Show More
54m 13s
Mar 2022
Enabling performance-centric engineering orgs (JS Party #216)
This week Amal and Nick are joined by Dan Shappir, a Performance Tech Lead at Next Insurance, to learn about enabling a performance-first mindset within your engineering org. Dan recently left his 7+ year tenure leading performance at Wix where he and his team improved, and monit ... Show More
1h 13m
Aug 2022
Qwik is a new kind of web framework
AngularJS creator Miško Hevery has a new web framework he wants to tell us about, but he’s not pitching just another framework, but with different DX. He says that Qwik is a fundamental rethinking of how a web application should work. And he’s here to convince Jerod & KBall that ... Show More
1h 2m
Jun 2022
Ahoy hoy, JSNation & React Summit!
Nick went to Amsterdam for JSNation & React Summit 2022 and he joins Jerod to report on all the goodness! He also sits down with two special guests involved with the confs to talk Jest Preview and GraphQL Cache Discuss on Changelog News Changelog++ members save 4 minutes on this ... Show More
1h 11m
Dec 2021
Frontend Feud: React Advanced Edition (JS Party #206)
Jerod, Nick, and a node_modules-worthy collection of JS friends played an intense game of Frontend Feud at React Advanced London’s after-party back in October. Today, you get to play along with us! Leave us a comment Changelog++ members save 3 minutes on this episode because they ... Show More
1h 5m
Nov 2023
What's new in CSS land
Una Kravets, developer advocate at Google & web platform ambassador, joins Amal & Nick to take them CSS to school as they start this podcast in CSS kindergarten and end it with a Level-Up CSS Diploma. (LUCD?) We explore all the amazing features which have recently landed in CSS — ... Show More
1h 14m
Sep 2023
Episode 486: High Performance PostgreSQL for Rails with Andrew Atkinson
If you love taking about databases, this is the episode for you. Ahead of the launch of his new book, High Performance PostgreSQL for Rails, Andrew Atkinson joined the show with special guest co-host, Pat Bair, to talk about why he wrote a book, why he focused on PostgreSQL and h ... Show More
31m 29s
Mar 2024
AI vs software devs
Daniel and Chris are out this week, so we’re bringing you conversations all about AI’s complicated relationship to software developers from other Changelog pods: JS Party, Go Time & The Changelog.Join the discussionChangelog++ members save 2 minutes on this episode because they m ... Show More
57 m