onSuccess on useQuery() --> No overload match this call
The onSuccess callback seems to be removed from last version of TanStack Query causing "No overload match this call" Error. Why ???
4 Replies
passive-yellow•10mo ago
Breaking React Query's API on purpose
Why good API design matters, even if it means breaking existing APIs in the face of resistance.
national-gold•10mo ago
What do you need the callback for ? As per Dominicks post, it's been removed. If your still having issues it might be worth reproducing what you are trying to do and explaining your use case.
stormy-goldOP•10mo ago
I read the TkDodo document and can understand his decision. However, it's pretty usefull to know more deeply when query succeded for certain edge cases.
national-gold•10mo ago
Yeah, you can still use the global cache callbacks for those I think