Optimistic UI
Optimistic UI updates the interface before the server confirms the operation. The client assumes that the mutation will succeed and immediately updates the local representation.
For example, when a user clicks a like button, the UI can immediately increment the count instead of waiting for the network response. If the mutation fails, the client rolls the change back.
Optimistic updates work best for operations with predictable outcomes and small, reversible changes.