3 ms·
Why not just trigger the fetch on keyDown and show it as soon as the response arrives, as usual? The time it takes to press a key is a reasonable target to aim
by oersted 1mo ago
Why not just trigger the fetch on keyDown and show it as soon as the response arrives, as usual?
The time it takes to press a key is a reasonable target to aim at for API latency I suppose, but it is still an arbitrary target. Waiting to display until keyUp just adds more latency if your API is faster. Having it synced with keyUp doesn't make it feel more immediate to me.
- s4i 1mo agoIt’s usually good to wait for user to do KeyUp before treating the string as final. A fellow commenter explained some of the reasons: https://news.ycombinator.com/item?id=49505993 https://news.ycombinator.com/item?id=49505993