Przeglądaj źródła

add comment about routeRef

reiji-h 3 lat temu
rodzic
commit
18d1940c56
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      apps/app/src/components/SearchPage.tsx

+ 2 - 0
apps/app/src/components/SearchPage.tsx

@@ -92,6 +92,8 @@ SearchResultListHead.displayName = 'SearchResultListHead';
 export const SearchPage = (): JSX.Element => {
   const { t } = useTranslation();
   const { data: showPageLimitationL } = useShowPageLimitationL();
+
+  // routerRef solve the problem of infinite redrawing that occurs with routers
   const router = useRouter();
   const routerRef = useRef(router);