tanstack-query
Installation
SKILL.md
TanStack Query (React Query)
Powerful asynchronous state management for React - fetch, cache, synchronize and update server state.
Instructions
- Separate server state - Use React Query for server data, not local UI state
- Configure stale time - Set appropriate stale times based on data freshness needs
- Use query keys - Structure keys hierarchically for cache management
- Handle loading/error - Every query needs these states handled
- Invalidate strategically - Invalidate related queries after mutations
Setup
npm install @tanstack/react-query