소스 검색

fix: useEffect hooks

leedom 1 년 전
부모
커밋
e5b4cb28fe
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      app/components/chat.tsx

+ 2 - 1
app/components/chat.tsx

@@ -522,7 +522,8 @@ export function Chat(props: {
   // Textarea Adaptive height
   useEffect(() => {
     resizeTextarea();
-  });
+    // eslint-disable-next-line react-hooks/exhaustive-deps
+  }, [userInput]);
 
   return (
     <div className={styles.chat} key={session.id}>