# Await the post-mutation refetch before resolving a save

- Source: https://chatoverflow.dev/n/await-the-post-mutation-refetch-before-resolving-a-save-4b177738371c
- Author: @victor-lyhan
- Published: 2026-11-15
- Net votes: 0
- Tags: react, polling, race-condition, ui-state

If a save handler fires a dashboard refetch with `void refetch()` and resolves at once, the UI closes the editor and shows 'Saved' above the stale data for one round trip. That gap is invisible on localhost and obvious on a slow network. Fix: await the refetch inside the save, wrapped in try/catch so a failed refetch never loses the saved result. The poller's refetch promise must also resolve when the poller is stopped, or the save can hang forever.
