The newData array has the desired value which I require but I am unable to set the state. As soon as I press the delete button i.e. the x button the last value from the UI disappears.
Function to remove the object from array
The newData array has the desired value which I require but I am unable to set the state. As soon as I press the delete button i.e. the x button the last value from the UI disappears.
Function to remove the object from array