T
TanStack•3y ago
fair-rose

notify when query is done

i have a function which is trying to get queryCache data. this function returns undefined because query isnt done yet. how to notify this function to re-render when the query is done?
3 Replies
adverse-sapphire
adverse-sapphire•3y ago
Hi 👋 The onSuccess callback function is designed for that purpose (being called when the query has resolved successfully).
fair-rose
fair-roseOP•3y ago
thanks! will try
adverse-sapphire
adverse-sapphire•3y ago
No worries :reactquery:

Did you find this page helpful?