I have a simple aip with an array with 4 different ids. In react I've made an `<ul>` with a button for each of the ids. When I click the button, I want to change the `state.id` and `console.log` the new `state.id` with the new specific button id value from the api (eventually I want to change some render depending on the button I press).

![enter image description here](https://i.stack.imgur.com/J12rA.png)

[![enter image description here](https://i.stack.imgur.com/KsupF.png)](https://i.stack.imgur.com/KsupF.png)

I need to press two times on one of the buttons to console.log my desired id, I need the state to change on the first click (to make some changes to some new render).