Completed
Intro
Class Central Classrooms beta
YouTube videos curated by Class Central.
Classroom Contents
The Best Way to Fetch Data from an API in React - SWR Preload & Optimistic UI
Automatically move to the next video in the Classroom when playback concludes
- 1 Intro
- 2 Welcome
- 3 SWR Explained
- 4 Starter Code
- 5 Install SWR
- 6 json-server
- 7 Axios API layer
- 8 Imports
- 9 useSWR hook
- 10 SWR mutate function
- 11 What is a mutation?
- 12 Check the CRUD operations
- 13 Adding some delay
- 14 Viewing stale data until success or fail
- 15 SWR 2.0 Preload data
- 16 Benefits of Optimistic UI updates
- 17 Refactor to Optimistic UI
- 18 Helper functions
- 19 Import the helpers
- 20 Mutate with Optimistic UI
- 21 Checking the Optimistic UI
- 22 A Challenge for You