Our initial, simplified approach may be fine for many scenarios, but is not the most robust solution. By simply taking a snapshot of current state (our list of items) and restoring it after a failure, we’ve left the potential for inconsistent state due to the fact that between taking the snapshot and failure, the user could have performed additional actions.
One solution is to, instead of taking a snapshot of our entire list of items, take a snapshot of the target item and use that upon failure to more precisely restore the individual item to state. This eliminates the possibility of incorrectly restoring items to state which have been successfully deleted.
This was a great course. Excellently instructed with great edge case coverage. I'm going to enjoy making use of this. Thanks very much
Thank you Steve! That means a lot to me 😃. I hope you came away having learned something new and gained some value from the course.
thank you for your course. good job!
Thanks for the course. Only one comment from me, maybe: we wouldn't normally do the data sorting in the event handler, but I understand this is probably for the sake of simplicity.