ソースを参照

add useCallback to Tag.tsx onReload

yuto-oweseek 4 年 前
コミット
0281e39a68
1 ファイル変更2 行追加2 行削除
  1. 2 2
      packages/app/src/components/Sidebar/Tag.tsx

+ 2 - 2
packages/app/src/components/Sidebar/Tag.tsx

@@ -36,9 +36,9 @@ const Tag: FC = () => {
 
   }, [isOnReload, mutateTagDataList]);
 
-  const onReload = () => {
+  const onReload = useCallback(() => {
     setIsOnReload(true);
-  };
+  }, []);
 
   if (!tagDataList) return <div>{t('Loading')}</div>;