This repository contains a small project that implements SWR 2.0 and optimistic updates.
This code is the result of following this YouTube Video.
Instead of using JavaScript, all files are now written in TypeScript.
In this branch I used a more complex cache option, instead of populateCache: true
Start local server
npx json-server -w data/db.json -p 3500
Start vite
npm run dev
๐ Hello, I'm Dave Gray.
๐ My Courses
โ Check out my YouTube Channel with hundreds of tutorials.
โ Buy Me A Coffee
๐ Follow Me:
๐บ YouTube Video for this repository.
DO NOT COPY FOR AN ASSIGNMENT - Avoid plagiarism and adhere to the spirit of this Academic Honesty Policy.
- ๐ SWR
- ๐ NPM: JSON Server
- ๐ NPM: React Hot Toast