A learning project focused on practicing TanStack Query (React Query) patterns and server-state management.
This project demonstrates common real-world patterns used when working with remote data in React applications.
- React
- TypeScript
- Vite
- TanStack Query
- Axios
- JSON Server (mock API)
- ✅ Data fetching with
useQuery - ✅ Server-side pagination
- ✅ CRUD operations
- ✅ Cache updates with
setQueryData - ✅ Optimistic updates
- ✅ Mutation lifecycle handling
- ✅ Loading and fetching state management
npm installRunning the Project 1️⃣ Start the frontend (Vite)
npm run devThe app will be available at:
http://localhost:5173 2️⃣ Start the mock API server
Run in a separate terminal:
npm run serverThe API will be available at:
http://localhost:3000 📁 Project Structure src/ ├─ api/ // API layer ├─ hooks/ // React Query hooks ├─ components/ // UI components ├─ pages/ // Pages └─ main.tsx
Author
Qnoisy; Ulbi TV