WhoBuilt

swr

A React library for fetching and caching data.

Also known as stale-while-revalidate, stale-while-revalidate concept

Key facts

Built by
Capabilities
client-side cache updates and revalidation for real-time-feeling data
Fetches API data and caches the response for use across the client

Timeline 3

Dated events, newest first. Open the sources under any item.

How we verify
Built1Capability2
20212 events
March
  1. as of Mar 2021Capability
    Client-side cache updates and revalidation for real-time-feeling data
    “when you refocus or revalidate the page” 5:00
    Unverified1 source· Talk
February
  1. as of Feb 2021Capability
    Fetches API data and caches the response for use across the client
    “a library for doing that” 1:34
    Unverified1 source· Talk
20191 event
  1. Oct 28, 2019Built
    Vercel built swr
    Source changed1 source· GitHub· archived

Talks 6

16:31
Building APIs with Next.js

The talk explains how to build APIs with Next.js App Router route handlers, including handling requests and responses, HTTP methods, dynamic paths, and shared authentication logic. It describes when Next.js APIs are useful, such as exposing an existing data layer to multiple clients or proxying requests to another backend. It also covers deployment options, including Node.js hosting, static exports for pre-rendered API responses, and Vercel’s Fluid Compute. The speaker compares route handlers with Server Actions and notes that Next.js may not suit projects that need features from a backend-only framework.

Feb 28, 2025· 17 minMentioned 15:05
59:53
Code Walkthrough for Next.js 13 / Tailwind CSS / MySQL App!

Lee Robinson walks through his personal website, explaining how it uses Next.js 13’s App Router and React Server Components alongside Tailwind CSS, MDX, and Contentlayer. He demonstrates static and server-rendered pages, incremental static regeneration, dynamic metadata and Open Graph images, and a client-side view counter backed by PlanetScale and Kysely. He also covers GitHub authentication for a guestbook, Framer Motion navigation, and a setup script that removes personal content for people who clone the repository.

Feb 6, 2023· 1 h 0 minMentioned 26:23
58:46
React Query with GraphQL code gen and Typescript

The talk demonstrates how to build a React Native app with React Query, GraphQL Code Generator, TypeScript, and graphql-request. It explains stale-while-revalidate caching, generated query hooks, initial data, refetching, mutations, optimistic updates, Suspense, infinite lists, and cache persistence. It compares React Query with GraphQL-focused clients such as Apollo Client and Relay, and shares practical advice on keeping component logic clean and testing behavior under poor network conditions. The speaker recommends GraphQL Code Generator and React Query for their productivity and flexible control over caching.

Oct 21, 2021· 59 minDiscussedMentioned 3:13 50:08
9:32
Using Serverless Redis with Next.js

The talk walks through a product roadmap app built with Next.js and Redis, showing how Upstash provides a serverless Redis instance with a free tier and per-request pricing. It covers deploying the app on Vercel, connecting Redis with environment variables, and using server-side rendering to load and rank roadmap features. The speaker also demonstrates SWR for client-side updates and explains API routes for creating features and subscribing users. The closing section highlights native HTML form validation and frames the project as an introduction to Redis as durable application storage.

Mar 26, 2021· 10 minDiscussed 5:00
9:26
What State Management Library Should I Use with React?

The talk explains how React state management has evolved and why different kinds of state call for different tools. It distinguishes UI state from server caching state, describing how Redux historically handled both and how libraries such as SWR and React Query focus on server data. It covers React Context, state machines, immutable updates with Immer, and state stored in URLs, using examples to show when each approach helps. Its main advice is to start with React’s built-in tools and add a library when a specific need, such as performance or complex state transitions, becomes clear.

Feb 8, 2021· 9 minDiscussed 1:34
Show 1 more talks