Closed UsmanKhawar010 closed 2 weeks ago
Hi @UsmanKhawar010.
Having looked at your code, I am not quite sure what causes the re-render of the chat, did you leave some code out? When you use the submitUserMessage method, the chat should send a message to the API and add a message bubble to the top, hence I am not quite sure why would that cause a re-render problem.
If possible, can you please provide more information.
Thankyou!
I am no longer working on it.
I want to implement a functionality that when a preset prompt is received, it populates the text-input field of model. without re-rendering the page.
useEffect(() => { if (selectedPrompt) { console.log('Selected prompt received:', selectedPrompt);
}, [selectedPrompt]);
return (