This project is a playground for practicing and learning Tanstack Query / React Query and Devtools associated with it. It focuses on concepts such as server state, pagination, caching, infinite fetching and scrolling... All API calls are handled by Tanstack Query using axios. The project is based on the Tanstack Query documentation.
The project uses the following data sources:
- json-server for the 'todos' part. It uses a local
db.json
file located in thedata
folder. - reqres.in for the 'users' part.
- jsonplaceholder for the 'posts' part.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Node.js
- npm or yarn or pnpm
- Clone the repo
git clone https://github.com/Yann-GitHub/tanstack-query-playground.git
- Install NPM packages
npm install
- Start the development server (runs on port 5175)
npm run dev
- Start the json-server (runs on port 3500)
npm run server