Refetching after invalidateQueries
Hey folks, when a refetch occurs after the invalidateQueries, it seems like it only occurs after I click outside of the window and then click back on the window again... I'm pretty certain I'm doing something wrong but is anyone able to point out why this might occur?
5 Replies
xenial-black•4y ago
Likely the keys are not matching
xenial-blackOP•4y ago
At the moment, I’m actually just using invalidateQueries(), iirc that just invalidates all the queries right?
xenial-black•4y ago
Yes
xenial-blackOP•4y ago
Yeah, I’m that case I’m guessing the keys are probably matching - or maybe I’m missing something else?
Besides that, are there other ones that might be causing that?
xenial-black•4y ago
Hard to say without seeing the code. Maybe this? https://tkdodo.eu/blog/react-query-fa-qs#2-the-queryclient-is-not-stable
React Query FAQs
Answering the most frequently asked React Query questions