streamich/rx-use

React hook that returns unmount notifier observable

Offen

#14 geöffnet am 18.05.2020

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (0 Forks)github user discovery
good first issuehelp wanted

Repository-Metriken

Stars
 (21 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Create React hook which returns and indicator observable which signals when component was unmounted.

const MyComponent = () => {
  const unmounted$ = useUnmounted();

  useEffect(() => {
    something$.pipe(
      takeUntil(unmounted$)
    );
  }, []);
};

Contributor Guide