React useState with a callback – Reactjs
I'm aware that useState is asynchronous. I'm attempting to have a toggle button that will add one point to score if itemSelected is true and remove one point from score if itemSelected is false. The issue here of course is…