Deleting expenses

For users to delete expenses from any month, we need to do the following things:

  • Add a method to storageMethods to update an expenses object. It should accept the month, year, and array of expenses. Then, it should override the array of expenses for that specific month and year combination in AsyncStorage with this new array, and recalculate the amount spent.
  • Wrap a TouchabbleHighlight component around each row that, when long pressed, opens an alert that asks the user whether they wish to delete the item.
  • If the user confirms that they would like to delete the item, then we should delete it. A new array of expenses for the current month should be created without the deleted item, and it should be saved using the storageMethods ...

Get React Native By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.