Refetch data on error
Hey, on Error I want to render a toast with a button that will refetch my query.
In v4 I could add
In v5 there is a global
In v4 I could add
onError callback to useQuery , call my toast method there and pass it a refetch method to a button onClick callback.In v5 there is a global
onError callback for QueryCache instance, but I don't know how can I refetch my query there as I have no access to refetch method.