Optimistic updates

Gemini: Optimistic updates make web apps feel faster by updating the UI instantly after user actions, like liking a post. It assumes success but can fix any mismatches later. This improves user experience but requires careful planning to avoid data inconsistencies.

However, optimistic updates don’t mean you should fire and forget it.

Let’s say removing a resource inside a list with a third-party service may not be able to finish instantly. If the user closes the page and launches it again, they may find that it is not removed, which can be frustrating.

fb4e47d77f6dc0707bfbbb7c3acca799.png

Therefore, a soft delete mechanism may be needed on the frontend side to filter out soft-deleted items (or show a removal icon).

See Also