Chat UI Messages and Avatar re-render on every keystroke
We are seeing issues with the Chat UI component re-rendering every time a character is typed into the input box. This is causing both the Avatar and ResponseRenderer to to render and it's an unusable UI since the avatar image needs to reload and Response renders again
@salmenus This is similar the issue reported here https://github.com/nlkitai/nlux/issues/112 but the extend of the issue is greater than just avatar as even for any response rendering, this causes issues
I did a deeper dive using a react profiler and found the reason why memo of any kind is not working. I was able to confirm the issue using this basic react playground example to make sure it was not any code that is specific to me
https://docs.nlkit.com/nlux/examples/react-js-ai-assistant
The profiler shows that on every key press this hook is causing issues and the reason react.memo does not work is because by the time it gets to Avatar and Renderer. It says "This is the first time component rendered" So memo does not work. This indicates the library has an issue with handling the keystrokes
Thanks for reporting this issue @lohit8846 and for detailed description. I'm investigating.
Hi Salmenus, du you have Fix for this Issue? Thank you very much
Hello, is this project overall still maintained? I also am encountering this issue with custom Renderer