Nextjs React Query Cache Coordination

Coordinate Next.js App Router caching layers with React Query to guarantee read-your-own-writes — covers Router Cache vs Data Cache, updateTag vs revalidateTag, hydration timestamp races, initialData vs placeholderData pitfalls, and monotonic cache timestamps. Use when a user saves data that then reverts on navigation, when a mutation's result doesn't survive a route change, or when debugging stale UI after a successful write. Trigger on "saved but reverted", "read your own writes", "stale after mutation", "revalidateTag", "updateTag", "HydrationBoundary", or "initialData stale".

catesandrew Updated

File contents

catesandrew/skills/tree/main/skills/nextjs-react-query-cache-coordination commit 09b987d1fe

Frequently asked questions

npx skillmds@latest add catesandrew/nextjs-react-query-cache-coordination