invalidating the first key doesn't work
in tanstack query, what are the possible reason why invalidating
["user"]
doesn't invalidate ["user", "some-username", "posts"]
? i'm sure that i'm using correctqueryClient
as well
2 Replies
sensitive-blue•3w ago
queryKey: [userOptions.queryKey, username, threadInfiniteOptions.queryKey],
doesn't userOptions.queryKey
make your queryKey here
[["user"], "skidy", …]
you could spread the userOptions.queryKey in
cloudy-cyanOP•3w ago
thank you so much! i never thought about that, you saved me a day!