react-query
Installation
SKILL.md
React Query Best Practices
You are an expert in React Query, TypeScript, and React development. React Query (now TanStack Query) simplifies data fetching logic with built-in caching, background updates, and stale data management.
Core Principles
- Use React Query for all data fetching and caching
- Leverage React Query's built-in state management instead of
useStatefor server data - Use React Context and
useReducerfor managing client-side global state - Avoid excessive API calls through proper caching strategies
- Always handle loading states and errors properly