Discover this podcast and so much more

Podcasts are free to enjoy without a subscription. We also offer ebooks, audiobooks, and so much more for just $11.99/month.

Playing with Server Components in Vercel’s Edge Runtime

Playing with Server Components in Vercel’s Edge Runtime

FromFrontend First


Playing with Server Components in Vercel’s Edge Runtime

FromFrontend First

ratings:
Length:
51 minutes
Released:
Aug 22, 2022
Format:
Podcast episode

Description

Ryan tells Sam about some experiments he’s been running using Server Components in Vercel’s new edge runtime. He talks about how components that suspend in the node runtime cause the static build of your Next.js app to wait until they unsuspend, while components that suspend in the edge runtime stream back fallback responses as data is being fetched. Ryan also tells Sam about a blocking JS trick he learned to alter the initial render of your clientside app based on client-specific data, like whether their theme preference is dark or light mode.Topics include:0:00 - Intro1:00 - Running synchronous JS before React’s initial render of build-time generated HTML17:03 - Using getServerSideProps on the edge in Next.js for run-time generated HTML32:15 - Behavior of Server Components that suspend in edge runtime vs. node runtimeLinks:Josh Comeau’s post on dark modeNext.js discussion on switchable runtime
Released:
Aug 22, 2022
Format:
Podcast episode

Titles in the series (100)

A podcast about modern UI development on the web. Hosted by Sam Selikoff and Ryan Toronto.