What it does
A Cursor rules file for React apps that fetch data with React Query. It covers a QueryClientProvider at the root, custom hooks for queries and mutations, query keys for caching, prefetching, and loading and error states. It also suggests TypeScript, optimistic updates and the DevTools.
Use cases
- 01Wrap an API call in a custom query hook
- 02Add optimistic updates to a mutation
- 03Define clear query keys for caching