React Query Example
This project is a demonstration of how to use React Query library to perform the following frontend API requests:
- Basic query
- Paginated query
- Infinite query
- Create, Update and Delete requests
This demo project is setup with:
- Vite: A very fast build tool
- WindiCSS: A very fast Tailwind CSS compiler
- React Hook Form: Form builder and validation library
- React Modal: An accessible modal component
- Axios: Promised based HTTP client for browsers
- JSON Server: Full fake REST API server
Feature
- typescript support, next.js, grpc-web
Run Locally
Clone the project
Go to the project directory
Install dependencies
npm install
Setup database file
cp api/sample.db.json api/db.json
Start the json-server
npm run server
Launch another terminal and start the Vite server
npm run dev
Head over to your browser and open the URL http://localhost:3000 to access the application.