streamich/rx-use

React hook that returns unmount notifier observable

開放

#14 建立於 2020年5月18日

 (0 則留言) (0 個反應) (0 位負責人)TypeScript (0 個分叉)github user discovery
good first issuehelp wanted

倉庫指標

星標
 (21 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

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

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

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

貢獻者指南