Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentWillUnmount() {
AppState.removeEventListener('change', this.handleAppStateChange);
BackHandler.removeEventListener('hardwareBackPress', this.handleBackPress);
// If we're currently tracking a location, don't stop watching for updates!
if (!this.isRouteTracking()) {
stopTrackingLocation();
}
clearInterval(this.staleLocationTimer);
// Do remove the emitter listeners here, as we don't want this screen to receive anything while it's non-existent!
emitter.off(GFWOnLocationEvent, this.updateLocationFromGeolocation);
emitter.off(GFWOnHeadingEvent);
emitter.off(GFWOnErrorEvent, this.onLocationUpdateError);
stopTrackingHeading();
this.props.setSelectedAreaId('');
}
return () => {
emitter.off("refresh", onEvent);
};
}, []);
return () => {
emitter.off("focus-interested", onFocus);
emitter.off("blur-interested", onBlur);
};
}, []);
componentWillUnmount() {
emitter.off("toggle-search", this._toggleSearch);
emitter.off("info-pop", this._onInfoPop);
if (ANDROID) {
this.keyboardWillHideListener.remove();
}
}
componentWillUnmount() {
emitter.off("select-marker", this._handleSelect);
emitter.off("deselect-marker", this._onDeselect);
}
componentWillUnmount() {
emitter.off("hide-sort", this._hide);
}
componentWillUnmount() {
emitter.off("calendar-top", this._scrollToTop);
emitter.off("scroll-to-item", this._scrollToItem);
if (IOS) {
emitter.off("reclip-calendar", this._reclip);
}
}
componentWillUnmount() {
emitter.off("fit-marker", this._fitMarker);
emitter.off("hide-callouts", this._hideCallout);
}
componentWillUnmount(){
emitter.off('drawer-open',this._openOverlay);
emitter.off('drawer-close',this._closeOverlay);
}
componentWillUnmount() {
emitter.off("calendar-top", this._scrollToTop);
emitter.off("scroll-to-item", this._scrollToItem);
if (IOS) {
emitter.off("reclip-calendar", this._reclip);
}
}