Disable Optimistic Update
Is there anyway for useQuery, useSuspenseQuery I can disable optimistic updates? For example, let’s say I have 5 table rows at the route A with fetching RQ. Then I move to route B and suddenly rows data increased to 8 on DB. When I move back to route A again, RQ will first show the stale data which is 5 rows and refetching on the background and once new data comes, shows up new data which is 8 rows in smooth way. Seems UX designer doesn’t want this and just want to show loading for prevent layout shift. Is there anyway I accomplish this easily such as disabling some flag?
1 Reply
national-gold•7mo ago
Check for isFetchedAfterMount