react-query
Installation
SKILL.md
React Query with Query Key Factory
Use TanStack Query for all server state. Use @lukemorales/query-key-factory to manage query keys. Never use raw string arrays as query keys.
Query Key Structure
One File Per Feature
Each feature defines its own query keys in a dedicated file using createQueryKeys. Include queryFn directly in the key definition.
// features/todos/queries/todo-keys.ts
import { createQueryKeys } from "@lukemorales/query-key-factory"
import { todoService } from "../services/todo-service"