reflex-chat icon indicating copy to clipboard operation
reflex-chat copied to clipboard

Experiencing rerenders

Open louisguitton opened this issue 2 years ago • 3 comments

I am unsure if this repo powers https://webui-teal-star.reflex.run/, but when I type in the chat, I'm getting hit by rerenders which lose some of my inputted information. Only when I type slow enough, all letters go through without loss. I am currently evaluation reflex vs streamlit vs gradio, and seeing a chat example that has no rerenders would help me in my decision-making process. Best

For the lolz: I asked the chatbot what to do, and it suggested to open an issue image

louisguitton avatar Nov 17 '23 10:11 louisguitton

Good catch, this is because we use the on_change handler currently which is sending a request on every key stroke. We should change this to use a rx.form and an on_submit

picklelo avatar Nov 26 '23 21:11 picklelo

Just encountered this issue as well when trying out the online demo, I type at around 60-100 WPM on average and the UI kept eating up my words

IMHO this should be categorized as a fundamental usability issue, not a possible enhancement. It doesn't provide the end user an optimal first impression as a demo, and definitely makes it unsuitable for production use.

DonaldKellett avatar Dec 10 '23 08:12 DonaldKellett

@louisguitton @DonaldKellett my PR Not just adding an extra API , also fix the bug , but it is not merger, you can refer it

jiangyangcreate avatar Dec 14 '23 01:12 jiangyangcreate