Client invalidateQueries not triggering refetch for server-side prefetched data
I'm using Next.js 15 with tRPC v11 and TanStack Query.
On the server side, I fetch and filter the user list based on query parameters. Here's how the data is prefetched using
getQueryClient and hydrated with HydrateClient:
On the client side, I have a DeleteUsersDialog component that allows bulk deletion of users. After deletion, I invalidate the users.list query so it refetches and reflects the updated list automatically:
2 Replies
grumpy-cyanOP•7mo ago
@TkDodo 🔮
equal-jade•7mo ago
Likely The key doesn't match, can't say more without a reproduction