How to preserve Error UI while a refetch is in progress?
If i place my refetch button in the Error UI, how do i preserve the error UI, since as soon
as my fetch is in progress, the
error state is reset to null
Also, is there a way to trigger globalLoaderChange only once, when the user first comes on the page, thereafter only the error ui provides the loading state. I tried playing around with failureCount, but was not successful.
The query is in with reference to react-query v4.
1 Reply
vicious-gold•3y ago
the idea is that as soon as the user acknowledges the error, you'll see the loading state again. This is also how e.g. react error boundaries work