You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by jkrobicki February 14, 2022
Description
When I fill in the input fast it reacts slowly and miss some letters. In the example I try to write "write here the name" .
That's what I thought, but it turns out this is only problematic for React in the case where the onChange handler responds asynchronously. When the handling is sync, then everything works.
Only React behaves correctly in that circumstance.
The issue is unrelated to the server-side event handler. This has to do with the fact that the server's response to an event is async - the fact that, to trigger a re-render, we have to go to a websocket and asynchronously await a response from the server is analogous to the case where React has problems.
That wouldn't really solve the problem. We'd have to buffer until the server responded with the next render before sending the next event. That doesn't work though since the server doesn't have to respond to events at all. That is, we don't strictly have to alternate between render, event, render, event, ...
I think I've found a way to solve this a different way though in #696
Activity
rmorshea commentedon Feb 28, 2022
#694 does not appear to have fixed this issue.
Archmonger commentedon Mar 1, 2022
My opinion is that if this limitation exists within React, there isn't a major reason to resolve this limitation within v1.
rmorshea commentedon Mar 1, 2022
That's what I thought, but it turns out this is only problematic for React in the case where the onChange handler responds asynchronously. When the handling is sync, then everything works.
Archmonger commentedon Mar 1, 2022
Do we handle this situation correctly if binding a sync IDOM event handler?
Or is it only React that behaves properly under those circumstances?
rmorshea commentedon Mar 2, 2022
Only React behaves correctly in that circumstance.
The issue is unrelated to the server-side event handler. This has to do with the fact that the server's response to an event is async - the fact that, to trigger a re-render, we have to go to a websocket and asynchronously await a response from the server is analogous to the case where React has problems.
Archmonger commentedon Mar 2, 2022
Would buffering received events within a queue help mitigate this? But we may already be doing this if I recall correctly.
actually fix #684
actually fix #684
rmorshea commentedon Mar 2, 2022
That wouldn't really solve the problem. We'd have to buffer until the server responded with the next render before sending the next event. That doesn't work though since the server doesn't have to respond to events at all. That is, we don't strictly have to alternate between render, event, render, event, ...
I think I've found a way to solve this a different way though in #696
actually fix #684
actually fix #684 (#696)
rmorshea commentedon Mar 3, 2022
I'm still observing some weird flicker in Brave, but Chrome and Firefox seem to work fine. Not quite sure why.