Differentiating refetch indicators for better UX
I have a UX question for my app. I have realised that I have two categories of refetching if I have to perform invalidation of a query after a mutation.
One, is If i take any mutation action on the query while it IS being Displayed, then I do not want two separate loading indicators to flash -one linked to mutation pending state, and second for refetching the query after mutation succeeds. Here I can return the promise of invalidation from my onSuccess callback to keep the mutation pending and not have any indicators for isFetching or isRefetching.
Second, if I have some other mutation (or same mutation) in different part of the app which also invalidates the same query while the query was not in view. When the query is displayed again, it does a refetch, but this time I DO WANT TO show some pending indicator related to refetch of query.
Is there a way to do that out of the box or via some custom code?
1 Reply
flat-fuchsia•11mo ago
we generally don't distinguish between "kinds of refetches"