Cant Figure Out Edit button

That’s the original post. So I have the selectedRecipe when I click on a name from the list. When edit is press exit brings up a modal that allows the user to edit that specific recipe. However the code I have now sets the input to the selected recipe, but doesn’t save it. Meaning I can click on pizza again, and the original recipe is there not the edited recipe. So I was discussing this with another user, and he suggested to edit the recipe, and use map to replace the original recipe with the edited one. Not sure how I can do that.