react-google-autocomplete
react-google-autocomplete copied to clipboard
Reassign event listener when onPlaceSelected changes
I found that when onPlaceSelected
handler has some dependencies, which can be change through the time - usePlacesWidget
still calls the old version of onPlaceSelected
.
Reassigning the event listener helps resolve this issue.