https://github.com/pj-mill/reactquery
A few examples of using react query (tanstack)
https://github.com/pj-mill/reactquery
react tanstack-react-query
Last synced: 3 months ago
JSON representation
A few examples of using react query (tanstack)
- Host: GitHub
- URL: https://github.com/pj-mill/reactquery
- Owner: pj-mill
- License: mit
- Created: 2023-09-11T12:51:15.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-09-20T10:02:33.000Z (almost 3 years ago)
- Last Synced: 2024-12-29T19:52:47.728Z (over 1 year ago)
- Topics: react, tanstack-react-query
- Language: TypeScript
- Homepage:
- Size: 532 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ReactQuery
3 apps demonstrating React Query (Tanstack) features.
### Blog App
Using jsonplaceholder API, this app demonstrates ...
1. Creating a QueryClient & QueryClientProvider
2. Implementing useQuery while using isLoading / isFetching / isSuccess / isError & error objects
3. Configuring 'staletime'
4. Pagination & Prefetching
5. Implementing useMutation for updates & deletes
### Star Wars App
Using swapi API, this app demonstrates JIT fetching for infinite scrolling.
### Spa Treatment
A small app for creating appointments that demonstrates ...
1. Manually caching data with setQueryData
2. Clearing data using removeQueries
3. Polling using the refetchInterval option
4. Prefetching Data
5. Mutating data with useMutation
6. Invalidating data with invalidateQueries
7. useCallback, useEffect hooks
8. Optimistic Updates