Files
main/rules-v0-deprecated/react-query-cursorrules-prompt-file/react-query-general-best-practices.mdc
T
2025-03-03 23:40:27 +05:30

9 lines
385 B
Plaintext

---
description: This rule outlines the general best practices for using React Query throughout the React project.
globs: src/**/*.tsx
---
- Use QueryClient and QueryClientProvider at the root of your app
- Implement custom hooks for queries and mutations
- Utilize query keys for effective caching
- Use prefetching for improved performance
- Implement proper error and loading states