![For some reason when I set the state of Picture, it throws an error stating that I am re-rendering too much. When I take out setPicture(...) though, the page renders completely fine. For some reason when I set the state of Picture, it throws an error stating that I am re-rendering too much. When I take out setPicture(...) though, the page renders completely fine.](https://preview.redd.it/b8ljnu3ynwq91.png?width=593&format=png&auto=webp&s=d38a04269de7f9452eba3eb3b8dc1b626426c144)
For some reason when I set the state of Picture, it throws an error stating that I am re-rendering too much. When I take out setPicture(...) though, the page renders completely fine.
![javascript - react js useState array is empty in first time click in the console log - Stack Overflow javascript - react js useState array is empty in first time click in the console log - Stack Overflow](https://i.stack.imgur.com/h7l4v.png)
javascript - react js useState array is empty in first time click in the console log - Stack Overflow
![javascript - Console.log() has a value but when I used it with map function it became undefined [ReactJS] - Stack Overflow javascript - Console.log() has a value but when I used it with map function it became undefined [ReactJS] - Stack Overflow](https://i.stack.imgur.com/SgXIx.png)
javascript - Console.log() has a value but when I used it with map function it became undefined [ReactJS] - Stack Overflow
![reactjs - How do I see state when logging to the console instead of Proxy object inside reducer action? - Stack Overflow reactjs - How do I see state when logging to the console instead of Proxy object inside reducer action? - Stack Overflow](https://i.stack.imgur.com/bmqGs.png)
reactjs - How do I see state when logging to the console instead of Proxy object inside reducer action? - Stack Overflow
![javascript - Object property is undefined when i try to show it or console. log - React & Hooks - Stack Overflow javascript - Object property is undefined when i try to show it or console. log - React & Hooks - Stack Overflow](https://i.stack.imgur.com/4HhnG.png)