I have an array ob objects that creates Close
buttons depending on how many there are of them. When i click Close
button i would expect the array to be updated (removed) then the button element will disappear from screen.
I have worked out in console.log
but unable to properly do setState :(
Example code here: https://codesandbox.io/s/sharp-kilby-hn2d9
Any help would be greatly appreciated, i believe it's just the formatting of setState i need to do it properly, but because its array of an objects and so on i just cant figure that one out.