Dodomeki

Frontend interview questions with sample answers

In a frontend interview, explain how the user experiences the problem before proposing a framework technique. Describe the state transitions, the behavior under slow networks or keyboard input, and how you'd verify them.

How would you handle out-of-order search responses in React?

Debounce the input to reduce requests. Abort the old fetch when the query changes and ignore any response whose request ID is no longer current. Keep loading, empty and error states distinct. Test the race by deliberately resolving an old request after the new one.

Follow-up · What do you show while new results are loading, and how do you make that clear to a screen-reader user?

How would you diagnose typing lag in a large table?

Record an interaction with the browser Performance panel and React Profiler. Identify whether the work is filtering, React rendering, layout or paint. Virtualize if too many rows are mounted, and use deferred updates if the expensive list can lag behind the input. Recheck on a slower device with realistic data.

Follow-up · How would you distinguish faster typing from a regression in the time to see filtered results?

What makes a dialog usable with a keyboard?

Give it an accessible name, move focus inside when it opens, keep keyboard focus within it, support Escape and restore focus to the trigger when it closes. Test the full flow without a mouse, including where focus goes if the trigger is no longer available.

Follow-up · What should happen to the background content while the dialog is open?

Practice out loud

Pick a search interface you've built. Explain how it handles a slow connection and describe the test that would catch stale results.

Start a free mock interview