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 correctqueryClientas well
2 Replies
adverse-sapphire•4mo ago
queryKey: [userOptions.queryKey, username, threadInfiniteOptions.queryKey],
doesn't userOptions.queryKey make your queryKey here
[["user"], "skidy", …]
you could spread the userOptions.queryKey in
fair-roseOP•4mo ago
thank you so much! i never thought about that, you saved me a day!