T
TanStack•12mo ago
metropolitan-bronze

Understanding .refetch() and error retry behavior.

Hey there, I have a query where I am awaiting .refetch() and then using the resulting data from it. I am wondering if in this case React Query does the retry behavior on failure, and if so, if that is included in the await for refetch.
2 Replies
absent-sapphire
absent-sapphire•12mo ago
yes and yes
metropolitan-bronze
metropolitan-bronzeOP•12mo ago
Thanks @TkDodo 🔮 ! Do you know if keepPreviousData could affect that? So if the refetch fails, does it keep the previousData? Nevermind, found in the docs it is false by default!

Did you find this page helpful?