How best to handle errors when updating optimistically? #1268
-
This is really a UX question but I thought I get your insights anyway. How would you guys normally handle errors when performing optimistic updates if the user had to submit some information? Consider the following scenario:
If an error occurs here we can revert/remove the new todo from the list and that's fine but wouldn't the user be a bit annoyed that they have to now go and enter the text all over again? This wouldn't be a huge deal for todos but if you consider something longer like editing a blog post it could become very annoying. Just wondering how you guys handle this scenario really? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
If it's a blog post, just don't delete the value from the input field, like the optimistic update example does it. Keep the value, maybe disable the field to disallow further editing. Clear the value onSuccess, and onError do the rollback and just enable the field again. |
Beta Was this translation helpful? Give feedback.
If it's a blog post, just don't delete the value from the input field, like the optimistic update example does it. Keep the value, maybe disable the field to disallow further editing. Clear the value onSuccess, and onError do the rollback and just enable the field again.