React Query Cache Determinism

Deterministic React Query cache updates for CRUD mutations — cancel-in-flight, update all related caches, correct merge semantics (deep-merge for patch, replace for create), optimistic status for async jobs, rollback on error, and invalidate-only-on-error. Use when a mutation causes UI flicker, when list and detail views disagree after a write, when a patch response corrupts nested data, or when an async delete/job needs instant feedback. Trigger on "UI flicker", "stale after mutation", "optimistic update", "deep merge cache", "setQueryData", "cancelQueries", or "cache rollback".

catesandrew 6b6a390 2 files · 8.9 KB Updated

File contents

catesandrew/skills/tree/main/skills/react-query-cache-determinism commit 6b6a3906af

Frequently asked questions

npx skillmds@latest add catesandrew/react-query-cache-determinism