Setting state does not change the value in GoogleMaps addListener – Reactjs
Very simple case, but I can't find the way out! I have a Google map with a single marker. The "click" listener callback function logs the state's value. I added a button that changes the state's value, and a useEffect…