Reactjs – setState is not a function- trying to setState with button id to use in useParams for page navigation
I am trying to update the state of a button once id has been clicked. This id is then stored in the state so that it can be passed as a params to navigate to the page that has the…