Frontend First - podcast cover

Frontend First

Sam Selikoff, Ryan Torontofrontendfirst.fm
A podcast about modern UI development on the web. Hosted by Sam Selikoff and Ryan Toronto.
Last refreshed:
Follow this podcast in the Metacast mobile app to refresh it and see new episodes.
Download Metacast podcast app
Podcasts are better in Metacast mobile app
Don't just listen to podcasts. Learn from them with transcripts, summaries, and chapters for every episode. Skim, search, and bookmark insights. Learn more

Episodes

Tim Neutkens on the Next.js App Router

Tim joins Sam to talk about his work on the new app router in Next.js 13. He explains how the app router leverages Server Components and React’s new cache API to bring a new level of composability to server-side code, how Server Actions are being designed to enable partial revalidation in a single round trip to the server, and how to think about UI updates as a result of server-side state changes. Topics include: 0:00 - Intro 2:53 - Rendering Server Components and the RSC payload 21:49 - Composi...

Aug 16, 20231 hr 45 minEp. 171

Understanding prop passing from RSC to Client Components

Sam and Ryan discuss how TypeScript helped them understand the mechanics of how props get passed from Server Components to Client Components, and how to properly type client component props if the prop starts out as a rich data type on the server. They also clarify some points from last episode’s discussion about the RSC payload. Topics include: 0:00 - Intro 0:40 - Clarifying what the RSC Payload actually is 10:12 - Understanding prop serialization when passing props from Server Components to Cl...

Aug 09, 202348 minEp. 170

Server-side rendering vs. Server Components

Sam and Ryan explore different ways to think about the RSC architecture, including what problems RSC solve, why RSC are valuable even in a world without server-side rendering, and how React’s reconciliation phase enables RSC to make partial updates to the UI as a result of server-side events. Topics include: 0:00 - Intro 5:45 - What if RSC were introduced before SSR? 10:54 - What does it mean to render RSC? 25:41 - Why SSR does not apply to Server Components 35:31 - Server-driven UI updates...

Jul 12, 202350 minEp. 169

Reusable pending UI for forms with Server Actions

Ryan shares his thoughts on how Server Actions and the useFormStatus hook are letting him build reusable pending UI for any form in his Next.js side project. Sam talks about how TypeScript prevents an entire class of data-loading bugs that have plagued single-page applications built with a client-side cache. Topics include: 0:00 - Tailwind Connect 2:38 - Using TypeScript to prevent data-loading errors 19:27 - Building reusable form UI with Server Actions and useFormStatus Links: Server Actions i...

Jul 05, 202342 minEp. 168

How Suspense led to Server Components (React Roundtable reaction)

Sam and Ryan share their thoughts on the recent React Roundtable with core team members Sebastian Markbåge and Andrew Clark. They talk about the evolution of Server Components from the perspective of solving the problem of fetching data in React apps, how SPAs have a lower baseline but higher ceiling in terms of the user experience they can deliver, and what they’d like to see from frameworks that are built on the RSC architecture. Topics include: 0:00 - Intro 0:36 - Recap of Server Components a...

Jun 07, 202351 minEp. 167

Learning by copy-paste

Sam and Ryan use some recent Twitter discussion on copying + pasting code (instead of abstracting it for reuse) as a springboard for a discussion about how their thinking on low-level UI components and design systems has changed over the years. Topics include: 0:00 - Intro 2:16 - Copy-paste vs. creating abstractions 11:43 - How we used to build shared UI components 15:34 - How we use UI components today 22:42 - Is copy-paste the easiest way for developers to implement consistent design? 27:41 - ...

May 24, 202341 minEp. 166

What problems do React Server Components solve?

Sam and Ryan share their learnings from working with Server Components in earnest over the past week. They talk about how Server Components can simplify client components by passing them props, why it makes sense for a component that can run everywhere to be a Server Component by default, whether RSC is causing unnecessary churn in the ecosystem, and how to think about choosing Server Components vs. client components for a given task. Topics include: 0:00 - Intro 0:48 - Lessons learned from buil...

May 17, 202351 minEp. 165

Implicit time zones and the TZ environment variable

Sam shares some recent learnings around hydration mismatches when rendering time zoned dates on the server and the client. He talks about using the TZ environment variable to reproduce the issue locally, and how he solved his problem by avoiding impure format and transformation functions from date-fns. Topics include: 0:00 - Intro 0:50 - Sever vs. client time zone mismatches, and the TZ environment variable 14:34 - Which date-fns functions are impure? 23:56 - Using intervals and comparison to re...

May 11, 202346 minEp. 164

React email previews and radial gradients

Sam and Ryan talk about using MJML to design, build and send transactional emails with React directly in the browser. They also chat about how to use Framer Motion to get a CSS radial gradient to follow the mouse cursor and the differences between React state, refs, Motion Values, and external stores. Topics include: 0:00 - Intro 1:10 - Building in-browser email previews with MJML 18:50 - Using radial gradients and Motion Values to build a moving spotlight treatment Links: MJML React Email Maizz...

May 03, 202342 minEp. 163

Blending modes and secure redirects

Sam and Ryan talk about building an animated tabs component with CSS’s mix-blend-mode property and Framer Motion’s layout animations. They also talk about how to use the URL constructor in JavaScript to help implement secure arbitrary redirects, as well as their initial reactions to new framework APIs that blur the lines between server and client code. Topics include: 0:00 - Intro 0:35 - Animated tabs with mix-blend-mode exclusion and Framer Motion’s layoutId 14:26 - Using the URL constructor fo...

Apr 26, 202338 minEp. 162

React Aria Components

Sam tells Ryan about his experience building an animated toggle with React Aria Components. He gives his first impressions of the new library and discusses some of functionality included from the lower-level React Aria hooks. Ryan also talks about his recent use of GitHub Copilot. Topics include: 0:00 - Intro 1:15 - Using GitHub Copilot to keep you working at higher levels of abstraction 8:15 - react aria components toggle. pressed state. When to use browser defaults vs headless for form inputs....

Apr 20, 202335 minEp. 161

JavaScript needs a model layer

Sam and Ryan talk about updating Build UI to support lifetime memberships. They chat about the site’s current architecture, the strengths and weaknesses of objects vs. functions, how the full stack JavaScript community could benefit from a proper model layer like ActiveRecord, the challenges of using GraphQL on the backend, Prisma, and more. Topics include: 0:00 - Intro 1:09 - Current architecture + single purchase 6:30 - Rails model layer. OOP vs functional 13:55 - What are classes good at, wha...

Apr 12, 202343 minEp. 160

Server Components and the React paradigm

Ryan and Sam use some recent Twitter conversation to guide a discussion about the design and purpose of React Server Components. They talk about how client trees and rendered on the server today, why a server-side rendered prepass is wasteful in light of RSC, how hydration of a client tree works, why RSC are never hydrated, how RSC is a purely additive technology, how server and client components can be interleaved, how RSC can be refreshed in-place without loss of any client state, how RSC fits...

Mar 15, 202351 minEp. 159

HTML, HTTP, and React

Sam and Ryan share their thoughts on the latest server-centric developments taking place among React frameworks like Remix and Next.js. They discuss the declarative nature of HTML and HTTP, the evolution of frontend development from imperative libraries like jQuery to declarative libraries like React, why developers started creating SPAs in the first place, the power and limitations of server-side links and forms, whether the frontend community has overcomplicated web development, the problem wi...

Mar 08, 20231 hr 1 minEp. 158

Caching strategies

Sam and Ryan have an open-ended conversation about different caching APIs and what kinds of benefits they might afford app developers. They discuss transparent caching layers, cache keys and surrogate keys in systems like Fastly, how SSG is effectively a high-level caching solution, Next.js 13.2’s cache API, Russian doll caching in Rails, whether a fetch cache is too high-level of an abstraction, and other topics. They also have a retro on choosing to use Hygraph as Build UI’s CMS, discussing so...

Mar 01, 20231 hr 9 minEp. 157

Saying goodbye to static generation

Sam and Ryan chat about their recent work migrating Build UI from a statically generated site to a run-time server-rendered app using Next.js. They talk about their past experience working on server-rendered apps, the problems that static sites were created to solve, and the tradeoffs involved within the static-to-dynamic continuum. Topics include: 0:00 - Intro 2:05 - How we built EmberMap with SSR + caching buckets with Redis 8:36 - How we launched Build UI as a static site with dynamic workaro...

Feb 22, 20231 hrEp. 156

Building user search with React Server Components

Ryan talks about a demo he built in Next.js 13 with React Server Components. He explains how RSC driven by the URL eliminated client-side states, how he used React 18 Transitions to enhance the UI, and how he was able to fine-tune the experience differently for the initial render vs. subsequent client-side navigations. Topics include: 0:00 - Intro 1:37 - Overview of Ryan’s user search page 14:06 - React 18 Transitions and how RSC eliminates client states 28:25 - How to change the UX for initial ...

Feb 15, 20231 hr 5 minEp. 155

Ship Small, Ship Fast

Ryan and Sam read a recent article by Derrick Reimer called “Ship Small, Ship Fast” and offer their thoughts on it. They discuss how implementation details can lead to reductions in scope, the relationship between shipping small and agile, and why quickly getting the first steps of a user flow into production is a good protocol for software teams to follow. Topics include: 0:00 - Intro 2:06 - Ship Small, Ship Fast read-a-long 7:22 - Reactions Links: Ship Small, Ship Fast by Derrick Reimer Derric...

Feb 08, 202331 minEp. 154

Lying in TypeScript

Sam and Ryan talk about seams in TypeScript programs where lies can sneak in. They chat about how API calls, form inputs, and URLs all relate to this problem, the similarity between drifting types and service mocks in testing, zod, and how type-safe languages like Elm eliminate this problem entirely. Topics include: 0:00 - Intro 2:41 - Lying in Typescript Links: Zod Elm language...

Jan 26, 202348 minEp. 153

Animating a Stable Diffusion side project

Ryan tells Sam about a side project of his that involves running the text-to-image deep learning model Stable Diffusion on his laptop in response to web requests. Ryan asks Sam questions about animating this UI, including how to animate indeterminate progress, how to avoid unintentional layout animation, and how to automatically repeat a set of items while scrolling rather than stopping at the end. Topics include: 0:00 - Intro 0:24 – Overview of Ryan’s Stable Diffusion project - 9:36 – Strategie...

Jan 19, 202348 minEp. 152

Lessons from stitching GraphQL services with Hasura

Ryan talks about the pros and cons of exposing Build UI’s environment-independent CMS from Hasura via schema stitching. He also talks about writing a Postgres function to add a derived field to a database model. Sam shares a debugging story about fixing his personal website due to a breaking change in a minor version of npm. Topics include: 0:00 - Intro 1:50 - Debugging Sam’s personal website due to a breaking change in npm related to peer dependencies 18:00 - Pros and cons of using a Postgres f...

Jan 11, 202354 minEp. 151

How to solve a SSR/CSR mismatch using the DOM

Sam and Ryan chat about how to avoid a flicker of content on initial render due to mismatched server/client rendering. They also chat about the pros and cons of React Hooks, and using StackBlitz containers to debug OSS issues. Topics include: 0:00 – Intro 1:46 – Ryan Florence’s tweets about Hooks, useEffect and refs 18:12 – How to avoid SSR/CSR rendering mismatches when your initial render depends on client-side APIs 37:40 – Using StackBlitz for reproduction in open source 45:17 – Isolated app d...

Dec 29, 202252 minEp. 150

Why we’re adding a CMS to Build UI

Sam and Ryan chat about issues they’ve run into in the past when building media sites that store content alongside other dynamic data like user accounts, and how they’re using a CMS to alleviate these problems in Build UI. They also talk about the approach they’ll be using for access control to the CMS. Topics include: 0:00 – Intro 0:27 – Unintentional security attack vectors 11:20 – Environment-specific vs. environment-independent data 23:43 – Architecture discussion for an environment-independ...

Dec 02, 202242 minEp. 149

Testing is inescapable

Sam and Ryan chat about building their new site using services, and how they’re thinking about testing it. They talk about how testability is one of the biggest costs of using third-party hosted services, why they continue to like services in spite of this downside, and the fact that you always end up testing your app whether you eventually automate it or not. Topics include: 0:00 - Intro 0:59 - How to run automated integration tests against a site that’s built with services...

Sep 16, 202236 minEp. 148

Type safety from Hasura to SWR

Ryan shares his experience getting end-to-end type safety from a Hasura backend into a React application. He tells Sam about the different ways GraphQL codegen can be used to generate types, and how he ultimately landed on a solution that combines the TypedDocumentNode type and the zod library. Topics include: 0:00 - Intro 2:51 - Using GraphQL Language Server to get autocomplete + linting 13:05 - Getting type information on the return object from a query passed to SWR 24:06 - Generating TypedDoc...

Sep 02, 202256 minEp. 147

Playing with Server Components in Vercel’s Edge Runtime

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 whe...

Aug 22, 202251 minEp. 146

The problem with buttons on the web

Sam and Ryan chat about issues with default HTML buttons on the web across different devices and browsers. They talk about the Extensible Web Manifesto, how the React Aria library helps standardize button behavior across platforms, and the difference between state-based and event-based animations. Topics include: 0:00 - Intro 2:09 – The problem with default buttons on the web - 17:26 – How we got here, and the Extensible Web Manifesto - 26:22 – React Aria’s unified Press interface - 32:26 – Gett...

Jul 20, 202255 minEp. 145

Should you use merge commits or rebase when working on large codebases?

Sam and Ryan talk about whether you should use merge commits or you should rebase commits in your PRs when working on large, fast-moving codebases. They also talk about implementing build-time client-side search with Stork, and why layering in animation code shouldn’t materially affect your existing React code. Topics include: 0:00 - Intro 1:48 – How to use D3 with React elements - 9:14 – Why you should unmount Modals and Dialogs when they’re not visible - 24:36 – Using Stork to implement build-...

Jun 06, 202256 minEp. 144

Read and discuss: Next.js Layouts RFC

Sam and Ryan read and discuss the first two sections of the new Next.js Layouts RFC, Nested Layouts and Server Components. They also reflect on their experience using nested layouts in other frameworks. Topics include: 0:00 – Intro - 10:21 – Layouts and creating UI (Apple Music example) - 33:40 – React Server Components - Links: Layouts RFC Framer Motion Course update...

May 31, 202257 minEp. 143

All about useEvent

Sam and Ryan talk about the new useEvent RFC, and how useEvent lets you extract event logic from your side effects. They also read and discuss Dan Abramov’s recent Twitter thread on how useEvent addresses the problems people are encountering with React 18’s Strict Mode behavior around running effects twice on mount. Topics include: 0:00 - Intro 0:34 - How useEvent relates to the changes to Strict Mode in React 18 12:04 - Dan Abramov’s thread on how useEvent relates to “fixing” useEffect 37:37 - ...

May 12, 202259 minEp. 142
For the best experience, listen in Metacast app for iOS or Android