How to use the tiny-emitter/instance.off function in tiny-emitter

To help you get started, we’ve selected a few tiny-emitter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github forest-watcher / forest-watcher / app / components / map / index.js View on Github external
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('');
  }
github syousif94 / frugalmaps / buncha / screens / UpNextScreen.js View on Github external
return () => {
      emitter.off("refresh", onEvent);
    };
  }, []);
github syousif94 / frugalmaps / buncha / components / InterestedModal.js View on Github external
return () => {
      emitter.off("focus-interested", onFocus);
      emitter.off("blur-interested", onBlur);
    };
  }, []);
github syousif94 / frugalmaps / frugalapp / src / Menu.js View on Github external
componentWillUnmount() {
    emitter.off("toggle-search", this._toggleSearch);
    emitter.off("info-pop", this._onInfoPop);
    if (ANDROID) {
      this.keyboardWillHideListener.remove();
    }
  }
github syousif94 / frugalmaps / buncha / components / MapMarker.js View on Github external
componentWillUnmount() {
    emitter.off("select-marker", this._handleSelect);
    emitter.off("deselect-marker", this._onDeselect);
  }
github syousif94 / frugalmaps / frugalapp / src / SortBar.js View on Github external
componentWillUnmount() {
    emitter.off("hide-sort", this._hide);
  }
github syousif94 / frugalmaps / frugalapp / src / CalendarList.js View on Github external
componentWillUnmount() {
    emitter.off("calendar-top", this._scrollToTop);
    emitter.off("scroll-to-item", this._scrollToItem);

    if (IOS) {
      emitter.off("reclip-calendar", this._reclip);
    }
  }
github syousif94 / frugalmaps / frugalapp / src / MapMarker.ios.js View on Github external
componentWillUnmount() {
    emitter.off("fit-marker", this._fitMarker);
    emitter.off("hide-callouts", this._hideCallout);
  }
github lvlrSajjad / react-native-blur-overlay / index.js View on Github external
componentWillUnmount(){
        emitter.off('drawer-open',this._openOverlay);
        emitter.off('drawer-close',this._closeOverlay);
    }
github syousif94 / frugalmaps / frugalapp / src / CalendarList.js View on Github external
componentWillUnmount() {
    emitter.off("calendar-top", this._scrollToTop);
    emitter.off("scroll-to-item", this._scrollToItem);

    if (IOS) {
      emitter.off("reclip-calendar", this._reclip);
    }
  }

tiny-emitter

A tiny (less than 1k) event emitter library

MIT
Latest version published 6 years ago

Package Health Score

67 / 100
Full package analysis