Hey everyone. I have been racking my brain trying to figure out an issue with my React recipe box. Since I am new to React I am assuming the solution is simple, but I have been staring at my code for far too many hours, and still not getting it. Here is the issue. Load up my pen here:
Click on a recipe to open the accordion, then click edit on the recipe to show the edit modal. Click on the ingredients text area and start adding more ingredients with commas. You will see that the ingredients list behind the modal is being updated in real time. This is not the intended behavior. The recipe list should not update until the user clicks save. The recipe modal and edit recipe function should only be editing a property on the application state called this.state.currentRecipe, but right now it looks like its updating the this.state.recipes (or is it?). For the life of me, I can’t figure out how the wires are getting crossed here. Sorry this is not a straight forward question about a code block, I just can’t see exactly where I am going wrong here.