← Coinbase Interview Insights

Coinbase·Frontend Engineer·Take-home Assignment·Senior

SeniorPrefer not to say
Jun 2026

Summary

Coinbase sent over a take-home for a frontend role, basically a full mini-app with a reusable list component, API fetching, reordering controls, tests, accessibility, the works. More involved than I expected for a take-home but it was a pretty clear spec at least.

Questions Asked (4)

Q1

Build a list component app in React, Vue, or Angular that fetches items from an API on mount and on demand, handles loading and error states, and prevents stale responses from overwriting newer state when requests overlap or the component unmounts.

API & IntegrationsTechnical Trade-offsSystem Design
Author's notes

The abort/cleanup part is where I spent most of my time.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and choosing a framework, then outline the component architecture with state for items, loading, and error. Emphasize the stale response prevention using AbortController and a request ID or cancellation flag, and demonstrate handling of mount, manual refresh, and unmount scenarios.

Pro tip: Use AbortController to cancel in-flight requests on unmount or new requests, and combine it with a request ID to ignore responses from outdated requests. This shows you understand both network-level and state-level race condition prevention.

1. Clarify requirements and choose stack

Ask about API details, expected error handling, and whether the component should support pagination or filtering. Choose React, Vue, or Angular based on your expertise and the company's stack.

2. Design component state and lifecycle

Define state for items, loading, error, and a request identifier. Plan useEffect (React) or equivalent lifecycle hooks to fetch on mount and expose a refresh function.

3. Implement stale response prevention

Use AbortController to cancel previous requests and a request ID or timestamp to ignore responses that don't match the latest request. Ensure cleanup on unmount to avoid setting state on unmounted component.

4. Handle loading and error states

Show a loading indicator during fetch, display error messages with retry option, and ensure UI updates correctly when requests are cancelled or fail.

5. Test edge cases and discuss trade-offs

Mention testing overlapping requests, rapid refresh clicks, and unmount during fetch. Discuss trade-offs between AbortController and request ID, and between different state management approaches.

Key Points to Mention

  • AbortController for cancelling in-flight requests on unmount or new request
  • Request ID or timestamp to ignore stale responses
  • Cleanup function in useEffect (React) or equivalent to prevent state updates after unmount
  • Loading and error state management with user feedback and retry
  • Handling overlapping requests: cancel previous or ignore outdated responses
  • Testing strategies for race conditions and unmount scenarios

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

Q2

Implement per-item up/down reordering controls that swap an item with its neighbor, with the first item's up and last item's down disabled. Use stable keys to preserve item identity across renders.

Technical Trade-offsAPI & Integrations
Author's notes

Stable keys tripped me up briefly.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints, then outline a component-based solution using stable keys and immutable state updates. Explain the swap logic and disabled states for boundary items, and discuss trade-offs like performance and accessibility. Conclude with testing and edge cases.

Pro tip: Mention that using array index as key breaks identity when reordering, so stable IDs are crucial; also note that disabling buttons should be accompanied by aria-disabled for accessibility.

1. Clarify Requirements

Confirm the expected behavior: swapping with neighbor, disabled states for first/last, and any constraints like performance or accessibility.

2. Design Component Structure

Propose a list component that renders items with up/down buttons, passing handlers and disabled flags based on index.

3. Implement Swap Logic

Use immutable array operations to swap items, ensuring stable keys (e.g., item.id) are used to preserve identity across renders.

4. Handle Edge Cases and Accessibility

Disable buttons appropriately, add aria-labels, and ensure keyboard navigation works; consider visual feedback for disabled states.

5. Discuss Trade-offs and Testing

Talk about performance implications (e.g., re-rendering only affected items), and how to test the component (unit tests for swap logic, integration tests for UI).

Key Points to Mention

  • Use of stable keys (e.g., unique IDs) instead of array indices to preserve item identity.
  • Immutable state updates to avoid direct mutation and ensure predictable re-renders.
  • Disabled state logic: first item's up button and last item's down button are disabled.
  • Accessibility considerations: aria-disabled, keyboard support, and focus management.
  • Performance optimization: memoization or shouldComponentUpdate to prevent unnecessary re-renders.
  • Testing strategies: unit tests for swap function, integration tests for UI interactions.

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

Q3

Write unit and component tests covering rendering, data fetching, reordering behavior, and edge cases like empty state and boundary items.

Technical Trade-offs
Author's notes

Wrote tests for the empty state, the disabled controls at list boundaries, and mocked the fetch to test loading/error/success flows.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the component's API and expected behaviors, then outline a layered testing strategy: unit tests for pure logic, component tests for rendering and interactions, and integration tests for data fetching. Prioritize edge cases like empty state and boundary items, and explain how you'd mock dependencies and assert reordering outcomes.

Pro tip: Emphasize testing user-visible behavior over implementation details, and use data-driven tests for boundary conditions to keep coverage high without brittle assertions.

1. Clarify requirements and component contract

Ask about the component's props, state, and expected behaviors (e.g., what triggers reordering, data fetching patterns). Confirm the testing tools and environment (Jest, React Testing Library, MSW).

2. Plan test layers and coverage

Decide which tests belong at unit level (pure functions, reducers) vs component level (rendering, user events) vs integration level (data fetching with mocked API). Map each requirement to a test type.

3. Write rendering and data fetching tests

Test initial render with loading and success states, mock API calls to verify data fetching and error handling, and assert that the UI updates correctly when data arrives.

4. Test reordering behavior and edge cases

Simulate drag-and-drop or button-based reordering, assert the new order and any side effects (e.g., API calls). Cover empty state, single item, and boundary items (first/last) to ensure no crashes or incorrect behavior.

5. Review and refine for maintainability

Ensure tests are readable, avoid over-mocking, and use helpers for repetitive setup. Discuss trade-offs like test speed vs realism and how to handle flaky async tests.

Key Points to Mention

  • Use React Testing Library to test behavior from the user's perspective, not implementation details.
  • Mock network requests with MSW or Jest mocks to test data fetching, loading, and error states deterministically.
  • For reordering, simulate user interactions (e.g., fireEvent.dragStart, dragOver, drop) and assert the DOM order and any callback invocations.
  • Edge cases: empty list, single item, reordering at boundaries (first to last, last to first), and handling of duplicate or missing keys.
  • Test accessibility: ensure reordering is keyboard-accessible and ARIA attributes are correct.
  • Keep tests fast and isolated; use beforeEach/afterEach for cleanup and avoid shared state between tests.

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

Q4

Structure the app with clear separation between data fetching logic and presentation components, and ensure the UI is accessible (keyboard navigable, proper aria-labels, focus management) and responsive.

System DesignTechnical Trade-offs
Author's notes

Split into a container component handling fetch state and a purely presentational list.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the app's requirements and constraints, then propose a layered architecture that separates data fetching (e.g., custom hooks, services) from presentational components. Explain how you would implement accessibility (keyboard navigation, ARIA labels, focus management) and responsiveness (CSS Grid/Flexbox, media queries) with concrete examples and trade-offs.

Pro tip: Emphasize that accessibility and responsiveness are not afterthoughts but should be baked into the component design from the start, and mention how you would test them (e.g., axe, Lighthouse, manual keyboard testing).

1. Clarify Requirements and Constraints

Ask questions to understand the app's scale, data sources, target devices, and accessibility standards (e.g., WCAG 2.1 AA). This ensures your design meets the actual needs.

2. Design Data Fetching Layer

Propose a clear separation: use custom hooks (e.g., useQuery) or services to handle data fetching, caching, and state management, keeping components pure and presentational.

3. Design Presentation Components

Create reusable, accessible UI components that receive data via props. Ensure they are keyboard navigable, have proper ARIA labels, and manage focus appropriately.

4. Implement Responsive Design

Use CSS Grid/Flexbox, relative units, and media queries to make the layout adapt to different screen sizes. Consider mobile-first approach.

5. Discuss Trade-offs and Testing

Explain trade-offs (e.g., performance vs. simplicity) and how you would test accessibility (axe, Lighthouse) and responsiveness (device emulation, real devices).

Key Points to Mention

  • Separation of concerns: data fetching logic in hooks/services, presentation in components
  • Accessibility: keyboard navigation, ARIA labels, focus management, semantic HTML
  • Responsive design: CSS Grid/Flexbox, media queries, mobile-first approach
  • State management: local vs. global state, caching strategies (e.g., React Query, SWR)
  • Testing: unit tests for hooks, accessibility audits, visual regression tests
  • Performance: code splitting, lazy loading, memoization to avoid unnecessary re-renders

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