diff --git a/API.md b/API.md index 6a668c4..7c7bd15 100644 --- a/API.md +++ b/API.md @@ -293,7 +293,8 @@ export default class SearchBox extends React.Component { this.searchBox.addListener('places_changed', this.onPlacesChanged); } componentWillUnmount() { - this.searchBox.removeListener('places_changed', this.onPlacesChanged); + // https://developers.google.com/maps/documentation/javascript/events#removing + google.maps.event.clearInstanceListeners(this.searchBox); } } ```