Replies: 2 comments 1 reply
-
|
An What you are looking for is probably a direct subscription to the QueryCache, but this will fire for all queries, so you'd to match on the query for yourself. For example, this is what |
Beta Was this translation helpful? Give feedback.
-
|
Came here with a similar question, "QueriesObserver" make it seem like a pub/sub on query key states. Wish it was — I just want to hide my splash screen when one of the queries returns data. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to be able to use
QueriesObserverto observe manyuseQuery/useMutationin various components. When I tried implementing from example:I did not understand why i need to supply
queryFn: fetchPost, if im adding above snippet in lets say root component inuseEffectthen why cant it just look atqueryKey?Ref: https://react-query.tanstack.com/reference/QueriesObserver
Beta Was this translation helpful? Give feedback.
All reactions