Optimistic UI is best for inconsequential things that don’t matter in consumer apps such as likes, comments, etc.
But dear God please don’t use it in Enterprise apps.
But dear God please don’t use it in Enterprise apps.
action -> UI recognition of action -> display API response
For actions that succeed 99% of the time, I think the "UI recognition of action" can be the success state. For actions with higher failure rates, the "UI recognition" should be a spinner or something to show the user that work is being done.If you've got a project where it's not acceptable to show "success" -> "oops I mean failure", just go with the spinner all the time. But, it makes a huge difference if you respond to a click in < 100ms vs. > 100ms.