Menu

1 / 5

Frontend Interview Question: Your Search Works Until You Type Faster

DEV Community: frontend·Emily Woods·11 days ago
#PicyzR7Y
#devtofrontend#devto#dev#request#input
Reading 0:00
15s threshold

One search box, two perfectly successful requests, and the small ownership rule that keeps your interface honest.

You type a few letters, the suggestions appear, and your little search component looks ready to show someone. Then you add one more letter and watch the results quietly travel backwards.

Honestly, this is the kind of interview exercise I like because the screen gives you nowhere to hide. You can explain promises beautifully and still put suggestions for ca underneath an input that says car .

Both requests can return successfully. Your debounce can work exactly as written. Nobody has to lose their internet connection for the interface to become wrong.

Let’s build the part that prevents that, and then make the bug appear on purpose.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.