- to run: npm i && npm run dev
- go to https://crudcrud.com and get your free api key and replace it in main.tsx file.
We’ll cover the following:
-
useQuery – with loading, data, and error states
-
Caching – using a query key
-
Stale Time – control when data becomes “stale”
-
Invalidation
-
Mutations – POST/PUT/DELETE with cache updates
🌟 Bonus Features
-
Suspense
-
Refetch Intervals – auto-refresh data on a timer