meta_pixel
Tapesearch Logo
Log in
Syntax - Tasty Web Development Treats

Gatsby vs Next

Syntax - Tasty Web Development Treats

Wes Bos

Tech News, Technology, News

4.9 • 1.2K Ratings

🗓️ 20 February 2019

⏱️ 52 minutes

🧾️ Download transcript

Summary

In this episode, Wes and Scott debate Gatsby vs Next — how they compare, the pros and cons of each, why you might chose one over the other for your next project, and more! LogRocket - Sponsor LogRocket lets you replay what users do on your site, helping you reproduce bugs and fix issues faster. It’s an exception tracker, a session replayer and a performance monitor. Get 14 days free at https://logrocket.com/syntax. The Armoury - Sponsor The Armoury is a men’s clothing and accessories retailer that provides some of the highest quality clothing you can buy. Designed for those of you who want the highest quality clothing that feels great and will last forever. Buy less, buy better. Follow them on Instagram @thearmourynyc and check out their website TheArmoury.com. Show Notes 5:07 - Server Side Rendering Next.js will render on demand — this allows you to have server rendered pages on demand. Think of a blog website — publish a new blog post and it will immediately start working. Authenticated pages can be server rendered, and thus, pre-loaded for better performance. Gatsby runs at build time only — so you need to have all of your data ready at build time. Pro: This makes for very fast page load. Con: Large websites can take a long time to build. Con: Gatsby can do network fetches from the client, but these lose the benefit of SSR. Ease of SSR: Next.js requires a complicated document.js file if you are fetching data anywhere other than a page component. This will probably get easier with Suspense. Demos are simple, but any real application requires harder config. Gatsby is Easy Peeezy! 11:09 - Data Next.js is unopinionated. Like React, it doesn’t care where your data comes from. getInitalProps(); Gatsby has a number of “source” plugins which will pull in data from sources — markdown, WordPress, API, file system. Once you have that data sourced, you can query it with GraphQL. 22:50 - Routing and Creating Pages Next.js makes you create a page in a pages directory. You can nest these as deep as you like. If you want to pass query params, you must do so with a ?query=string. There are several third-party options for getting around this that require a node server. Gatsby allows you to programmatically create pages with their createPage API. For both navigating between pages, they make a Link Component available. 30:49 - Plugins In Gatsby, everything goes through the Gatsby pipeline. This makes things like image compression, pagination, sass, service workers and many other progressive web app pieces very easy. Gatsby makes building a really good website easy. Gatsby Image is SOOOOO amazing. The scope of Next.js is much smaller. They give you a few things, but you generally bring your own approach for most things Routing Linking and prefetching Dynamic Importing 38:42 - Deploying and Hosting Gatsby is just HTML, CSS, and JS at the end of the day, so it can be deployed almost anywhere — Netlify, Github Pages, cheap PHP hosting, etc. Next.js is a Node app. It can be integrated into an existing Express app, or run by itself. Requires a Node server to run it. Next.js has a static generation option, but you’re better off using Gatsby for that. 44:41 - The verdict? Us Next.js for Apps, Gatsby for Websites Links LogRocket The Armoury Next.js Gatsby Netlify Node Express ××× SIIIIICK ××× PIIIICKS ××× Scott: Motion LED Lights Wes: The Dream Podcast Shameless Plugs Scott’s Pro Gatsby 2 Course Wes’ Courses Tweet us your tasty treats! Scott’s Instagram LevelUpTutorials Instagram Wes’ Instagram Wes’ Twitter Wes’ Facebook Scott’s Twitter Make sure to include @SyntaxFM in your tweets

Transcript

Click on a timestamp to play from that location

0:00.0

You're listening to Syntax, The Podcast with the Tastiest Web Development Treats out there.

0:06.0

Strap yourself in and get ready.

0:08.0

Here is Scott Telinsky and West Boss.

0:10.5

Welcome to Syntax, the Podcasts with the web development treats out there. My name is West Boss. I'm a full stack web developer from Canada and with me as always is Scott Tolinsky who is also a full stack

0:22.8

web developer. How you doing Scott?

0:24.4

Hey, I'm doing good.

0:25.4

I'm not from Canada though.

0:26.3

I'm from the United States.

0:28.5

Yeah, no, we are across the border here.

0:32.4

I'm doing good.

0:33.2

If you can't tell from my voice right now,

0:35.2

you'll probably be able to tell as the honey is wearing off

0:37.8

that I am a bit under the weather.

0:41.4

I have the worst kind of sickness for hosting a podcast, which is one that involves your throat.

0:45.6

So here I might be struggling a little bit to be talking.

0:48.7

Hopefully it's not too bad, and hopefully my voice isn't blown out the base in your speakers today because I'm getting a little basey.

0:55.2

How are you doing? I'm doing great. I am going to Paris in a couple days for some developer stuff so I'm pretty excited about that. So today we're going to be talking all about next versus Gatsby. This is a question I get all the time from people. Why didn't you use Gatsby in your course or why did you choose next

1:15.2

what are the benefits of the upsides and downsides in both of them so there's a lot

1:19.1

going on in this question it's not they're not totally comparable but they do overlap in a lot of the

1:25.1

areas so we're going to attempt to break that down today and explain why you might want to

1:29.7

grab one over the other. Today we are sponsored by two awesome companies first one is one brand new sponsor, but one we've been talking to for a long time and it's a clothing sponsor.

1:45.4

It's called the armory and they are a men's retailer out of New York and Hong Kong.

...

Please login to see the full transcript.

Disclaimer: The podcast and artwork embedded on this page are from Wes Bos, and are the property of its owner and not affiliated with or endorsed by Tapesearch.

Generated transcripts are the property of Wes Bos and are distributed freely under the Fair Use doctrine. Transcripts generated by Tapesearch are not guaranteed to be accurate.

Copyright © Tapesearch 2026.