Before we can animate the deltion of a todo item, we have to change the way the delete happens, so that the
TodoItem component sticks around for long enough to animate off the screen, before being completely removed from the component tree.
We will do that by doing a "soft delete" on the todo item by setting a
deleted flag. Then, it will be the responibility of the
TodoItem component to delete the todo from teh API.
Summary of Content:
- Move the API call for deleting items to a new method
- "Soft delete" the todo item by setting a
deletedflag on the item in state
- Create a componentDidUpdate method on TodoItem to detect the deleted flag change, use setTimeout to simulate an animation delay, and then delete the item using the api call