100

I'm reading the intro to redux pattern, and there is the following paragraph there:

... consider the new requirements becoming common in front-end product development, such as handling optimistic updates, rendering on the server, fetching data before performing route transitions, and so on.

My question is what is meant by optimistic updates here?

urosc
  • 1,938
  • 3
  • 24
  • 33
Max Koretskyi
  • 101,079
  • 60
  • 333
  • 488
  • 69
    Example right here: when clicking the up or downvote arrow, the UI reflects the vote immediately, even if the server hasn't successfully processed it yet. The vote will actually be rolled back with an error message if the server fails. – deceze Oct 08 '15 at 07:51
  • 2
    http://ux.stackexchange.com/questions/17514/should-we-be-optimistic-or-pessimistic-with-ui-updates-on-ajax-requests – Barmar Oct 08 '15 at 07:51
  • 2
    @deceze, thanks, yeah, that's the good example. – Max Koretskyi Oct 08 '15 at 08:23
  • @Barmar, thanks for the link, I'll read through it. – Max Koretskyi Oct 08 '15 at 08:24
  • 4
    @deceze I wonder how much of the upvotes for this question are from people testing to see the behavior described in your comment in action :). Mine definitely is! – kremuwa Oct 04 '18 at 19:00

1 Answers1

144

In an optimistic update the UI behaves as though a change was successfully completed before receiving confirmation from the server that it actually was - it is being optimistic that it will eventually get the confirmation rather than an error. This allows for a more responsive user experience.

doublesharp
  • 26,888
  • 6
  • 52
  • 73