Optimistic UI
Also called: Optimistic update, Rollback
Updating the screen immediately, before the server confirms, and rolling back if the request fails.
Definition
Optimistic UI makes apps feel fast: a like, a toggle or an archive shows as done right away while the request runs in the background. If the server fails, the app must undo the change and tell the user. Testers simulate failures to check that rollback really happens.
In practice
You turn off "Offers" and the switch flips instantly. On a failing network it should flip back with a message, not stay off while the server still has it on.
Learn it in context
Lessons that use this term.
Related terms
- Toggle switchAn on/off control that applies a setting immediately, like Wi-Fi or Dark mode.
- Loading stateWhat the UI shows while it waits for data or an action to finish, such as a spinner or skeleton.
- State persistenceWhether the app remembers what the user did after navigating away, rotating, or restarting.