What do you mean by update it with?
Right now I trying to show the array by using {this.state.arr} in the last return.
,Some minutes later
I finally got what you meant now.
I am getting the target id and the target quantity as expected, I tried only pushing the id and the quantity in the array before and it worked fine but what it did was only pushing every time I clicked the button so I got it to display for example 11 (id:1,quantity:1) when I clicked the first button then 1121 when I clicked the second one and 112131 the third one, if I changed the quantity of the first for example I would get 11213114.(if the quantity was 4)
I didn’t figure it out actually, it doesn’t work yet.
To be honest the post was posted by mistake without me wanting to but I left it as it was because the wiFi didn’t work. Then I didn’t give it much importance later and I tried to find a way by myself. I will try to make a jsfiddle of what I want to see if I find a solution that works.