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
On the client side, I have a
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: