A note editor uses useReducer. Adding a note appends it to the list. Editing a note should update just that note's text. Editing always adds a duplicate instead of updating in place.
Click Edit on a note, change the text, click Save. The original note stays and a second copy with the new text appears below it. The list grows instead of updating.
The EDIT case in the reducer is pushing a new item into the array instead of mapping over the existing ones and replacing only the matching note.
The EDIT case in the reducer is pushing a new item into the array instead of mapping over the existing ones and replacing only the matching note.