I\'m struggling to update the state properly inside async code. On every render my state gets updated with different values whereas it should be the same value every time. I