Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

egghead.io

Create an Optimistic UI in React with SWR

via egghead.io

Overview

Vercel's data-fetching library SWR features a client-side cache. Learn how to use the mutate hook to manipulate this cache in order to optimistically update your UI without waiting for a response from the network.
Learn more about SWR here: https://github.com/zeit/swr

Syllabus

  • Optimistically Update SWR's Cache with Client-side Data
  • Update SWR's Cache with a Server-side Response
  • Visually Indicate That a Background Save is Taking Place in an Optimistic UI with React
  • Revert Optimistic UI Updates when the Server Errors

Taught by

Sam Selikoff

Reviews

4.5 rating at egghead.io based on 10 ratings

Start your review of Create an Optimistic UI in React with SWR

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.