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$)
    );
  }, []);
};

贡献者指南