The gap between your Server Action and your UI has a name: setQueryData
The Server Action resolves, the toast says "saved," and the UI still shows the old data for a beat. That beat is the gap setQueryData closes without waiting for the full server roundtrip.
Sep 08 2026 · 7′ · Tutorials · Next.js · React