Revert Optimistic UI Updates when the Server Errors

Sam Selikoff
InstructorSam Selikoff
Share this video with your friends

Social Share Links

Send Tweet

Error handling in Optimistic UIs can be complex, since changes have already been made to the client-side cache by the time the server responds with an error. Let's look at one approach to dealing with errors in our todo app: removing our temporary todo from the list, and putting the data back into the New Todo field to help avoid losing the user's data.