Optimistic UI Design
An Optimistic User Interface is the point at which a client triggers an activity and the UI refreshes quickly, despite the fact that there might be a demand pending.
At the point when our application is constructed utilising this sort of UI, we can refresh the UI immediately to the achievement case. If there should be an occurrence of disappointment, the UI will return to the first state.
In the user’s eyes, this UI gives us a significantly snappier and responsive experience. At the point when utilised sparingly, optimistic UI updates can give our application a more cleaned and more responsive field without complexity.
- Catch user action
- Update state (local/redux) as if it successes
- Fire a request
- Catch the failure case and revert back to previous state