I got a noteApp. This App creates a new note, updates a note,delete the note and complete note. Each note has a complete button, edit button and delete button.
When I click the complete button on one note it will strike through the text inside the note, disable the edit button and also changes the complete button to Undo Complete Button.
I am having an issue with clicking on the complete button of a note. When I click complete its strikes all the notes in the app. I want only that note to be striked.
what should I write in the completeHandler function so that only I strike that note. (in current completeHandler I am setting state as strikeThrough: true based on that I add style in Post Component).Could someone help to clarify my issue. I want only that note striked out not all notes
Tejas H
My purpose is to help/impact as many lives as possible.
On
**complete = {()=>this.completeHandler(post._id)}**line, you are passing postidbut you aren't recieving that oncompleteHandlerfunction. Do that.What's the structure of your
postarray? You need a property which defines whether thatpostiscompletedor not. Ifstateof 'completed' property of that particularpostiscompletedortrue, (maybe) add a class to thatpostwhile you render.