Gatsby vs Next.js in 2021

Gatsby vs Next.js in 2021

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 Compression/resize Lazy loading SVG Blur up Next 10 released first revision of Next.js image It’s not as good as Gatbsy-image Must specify width and height, whereas gatsby has fixed and fluid Compression No blur up Yes lazy loading both don’t support gifs Gatbsy requires annoying GraphQL query OR another plugin like MDX to do it Not for long! https://twitter.com/ascorbic/status/1320770231657238529 Next.js is just

Episoder(976)

Potluck - Headless WordPress, Databases, Regex

Potluck - Headless WordPress, Databases, Regex

In this episode of Syntax, Wes and Scott answer your questions about headless WordPress, Regex, their health and fitness, CSS custom properties in media queries, and more. Sentry - Sponsor If you wan...

15 Jun 20221h

I can has() new CSS Selector?!

I can has() new CSS Selector?!

In this Hasty Treat, Scott and Wes talk about new CSS selectors :has, :where, and :is. MagicBell - Sponsor MagicBell is the the notification inbox for your product. Add a MagicBell to your product f...

13 Jun 202225min

Supper Club × Is No Code going to take our jobs? with Connor Finlayson

Supper Club × Is No Code going to take our jobs? with Connor Finlayson

In this supper club episode of Syntax, Wes and Scott talk with Connor Finlayson about his experience building and teaching no code projects. Postlight Podcast - Sponsor Postlight is a strategy, desi...

10 Jun 20221h 1min

Syntax Live at Reactathon

Syntax Live at Reactathon

In this episode of Syntax, Wes and Scott are live from Reactathon 2022! Sentry - Sponsor If you want to know what’s happening with your code, track errors and monitor performance with Sentry. Sentry’...

8 Jun 202251min

Stopping Malicious Actors

Stopping Malicious Actors

In this Hasty Treat, Scott and Wes talk about ways to prevent malicious people from using or abusing your app. Linode - Sponsor Whether you’re working on a personal project or managing enterprise in...

6 Jun 202221min

Supper Club × Coding Burnout and Gardening with Anselm Hannemann

Supper Club × Coding Burnout and Gardening with Anselm Hannemann

In this supper club episode of Syntax, Wes and Scott talk with Anselm Hannemann about burning out, trying out gardening, and how getting away from the screen can help restore your creative energy. Ha...

3 Jun 20221h 1min

Git in VS Code

Git in VS Code

In this episode of Syntax, Wes and Scott talk all about how they use Git inside of VS Code, extensions they use, and the various ways to interact with Git in VS Code. Linode - Sponsor Whether you’re...

1 Jun 20221h 2min

Cache Control Headers Explained

Cache Control Headers Explained

In this Hasty Treat, Scott and Wes answer a question about caching, cache control headers, an explanation of the fields for caching. Sentry - Sponsor If you want to know what’s happening with your co...

30 Mai 202225min

Populært innen Politikk og nyheter

giver-og-gjengen-vg
aftenpodden
aftenpodden-usa
i-retten
forklart
stopp-verden
popradet
fotballpodden-2
det-store-bildet
dine-penger-pengeradet
rss-gukild-johaug
bt-dokumentar-2
hanna-de-heldige
aftenbla-bla
nokon-ma-ga
rss-ness
e24-podden
rss-penger-polser-og-politikk
frokostshowet-pa-p5
chit-chat-med-helle