Loading video player...
In this video we build a small Next.js app with SWR: we fetch a video list and a single video, handle loading and error states, then update a video title with mutate and optimistic updates so the UI feels instant. We also revalidate the list so the feed stays in sync when you navigate back. Timestamps: 00:00 Intro — What is SWR? 00:15 Getting Started + Hook Signature 00:44 SWRConfig for Global Configs 01:16 App walkthrough + Optimistic Update in Action 02:50 SWR Revalidation Strategies 03:43 Implementing Basic SWR Logic (video feed) 05:50 What Are Mutations? 06:21 Overview of Mutations In SWR 07:09 Optimistic Update with Mutate (video details) 10:22 Final Verdict Topics covered: https://swr.vercel.app/docs/getting-started https://swr.vercel.app/docs/mutation https://react.dev/reference/react-dom/components/form https://developer.mozilla.org/en-US/docs/Web/API/FormData Code repo: https://github.com/jonatanramhoj/react-tutorials Subscribe for more modern React & TypeScript content! ⚡