frontend-state-and-data
Installation
SKILL.md
Frontend State And Data
Overview
Keep most business logic on the backend. Frontend orchestration should submit intent, call the backend, update or invalidate server-state caches, and render results.
Server State
Use TanStack Query for server state, async reads, mutations, cache invalidation, retries, background refresh, and optimistic cache updates when needed.
For writes, use useMutation; pass a slice command as mutationFn.