Skip to content

Commit

Permalink
explaining useRef
Browse files Browse the repository at this point in the history
  • Loading branch information
felixlaii committed Mar 17, 2024
1 parent 3cd89a8 commit 09e11ff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/ui/chat-box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ const ChatBox: React.FC<ChatBoxProps> = ({
// State for the input message and loading indicators
const [input, setInput] = useState("");
const [isLoading, setIsLoading] = useState(false);

// useRef for chat container and text area
const chatContainerRef = useRef<HTMLDivElement>(null);
const textAreaRef = useRef<HTMLTextAreaElement>(null);

Expand Down

0 comments on commit 09e11ff

Please sign in to comment.