← Coinbase Interview Insights

Coinbase·Software Engineer·Technical Phone Screen·Senior

SeniorPrefer not to say
Jun 2026Remote

Summary

Coinbase frontend interview where they had me build an autocomplete component from scratch, covering everything from debouncing to race condition handling to keyboard nav. Pretty thorough for a single question but it spiraled into a lot of state design discussion I wasn't fully prepared for.

Questions Asked (1)

Q1

Build an autocomplete input component from scratch. It needs debounced keystrokes, async fetch with loading/error/empty states, stale response prevention, a keyboard-navigable suggestions list, and a walkthrough of your state and event-handler design.

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

This one kept expanding.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then outline the component's architecture, focusing on state management and event handling. Walk through the implementation step by step, explaining how you handle debouncing, async fetching, race conditions, keyboard navigation, and edge cases like loading, error, and empty states. Emphasize trade-offs and why you chose specific solutions.

Pro tip: Demonstrate awareness of accessibility by mentioning ARIA roles and keyboard interactions, and discuss how you would test the component, including mocking API calls and simulating user input.

1. Clarify Requirements and Constraints

Ask questions to understand the expected behavior, such as debounce delay, API endpoint, error handling, and accessibility requirements. Confirm the scope: is it a controlled component? Does it need to support caching?

2. Design State and Event Handlers

Define the component's state: input value, suggestions, loading, error, and active index. Outline event handlers for input change, keydown (arrow keys, enter, escape), and blur/focus. Explain how debouncing will be implemented (e.g., using setTimeout or a custom hook).

3. Implement Async Fetch with Race Condition Handling

Describe how you'll fetch suggestions asynchronously, using an AbortController or a request ID to ignore stale responses. Show how loading, error, and empty states are managed and rendered.

4. Add Keyboard Navigation and Accessibility

Explain how to make the suggestions list navigable with arrow keys, selectable with Enter, and dismissible with Escape. Mention ARIA attributes like role='combobox', aria-expanded, aria-activedescendant, and aria-live for screen readers.

5. Discuss Trade-offs and Testing

Talk about trade-offs: debounce delay vs. responsiveness, caching vs. freshness, and controlled vs. uncontrolled input. Briefly mention testing strategies: unit tests for debounce and fetch, integration tests for keyboard navigation, and mocking API responses.

Key Points to Mention

  • Debouncing implementation using setTimeout and cleanup on unmount or new input.
  • Race condition prevention using AbortController or a request sequence ID.
  • State management: separating input value, suggestions, loading, error, and active index.
  • Keyboard navigation: arrow keys to move active index, Enter to select, Escape to close.
  • Accessibility: ARIA roles and properties for combobox and listbox.
  • Error handling: displaying error messages and allowing retry, and handling empty results gracefully.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.