Reactjs – Setting useState hook at first click returns undefined
I'm having trouble setting the taskID at my useState hook. once I click the button it returns me undefined but once I refresh the whole page it works perfectly. I was suspecting that the reason for this was the way…