← Coinbase Interview InsightsFrontend Engineer

Coinbase·Frontend Engineer·Technical Phone Screen·Intermediate

Intermediate
Apr 2026

Summary

Coinbase frontend interview that centered on a React data-fetching problem. The question sounded straightforward but had enough moving parts to trip you up if you weren't thinking about performance from the start.

Questions Asked (3)

Q1

You're building a blog app that fetches posts and users from separate API endpoints. Each post has an authorId. How do you render each post with the correct author name, and show 'you' for posts belonging to the logged-in user?

API & IntegrationsSystem DesignTechnical Trade-offs
Author's notes

My first instinct was to fetch users inside the post render loop, which is the exact wrong move.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by explaining how you would fetch posts and users in parallel, then normalize the user data into a lookup map for O(1) access. For each post, use the authorId to find the author name, and compare the authorId with the logged-in user's ID to conditionally render 'you'. Discuss trade-offs like caching, error handling, and performance.

Pro tip: Mention that you would memoize the user lookup map and consider using a custom hook or context to avoid prop drilling, especially if the logged-in user info is needed in multiple components. Also, highlight the importance of handling edge cases like missing authors or API failures gracefully.

1. Fetch data in parallel

Use Promise.all or similar to fetch posts and users simultaneously, reducing overall loading time. Handle loading and error states for both requests.

2. Normalize user data

Transform the users array into a dictionary keyed by user ID (e.g., using reduce) for efficient lookups when rendering each post.

3. Render posts with author names

For each post, look up the author's name using the authorId from the normalized user map. Fallback to a placeholder if the author is not found.

4. Conditionally display 'you'

Compare each post's authorId with the logged-in user's ID. If they match, render 'you' instead of the author's name.

5. Optimize and handle edge cases

Memoize the user map and consider caching to avoid redundant fetches. Handle missing authors, API errors, and loading states gracefully.

Key Points to Mention

  • Parallel data fetching with Promise.all to improve performance
  • Normalizing user data into a lookup object for O(1) access
  • Comparing authorId with logged-in user ID to conditionally render 'you'
  • Handling loading and error states for both API calls
  • Memoization and caching strategies to avoid unnecessary re-fetches
  • Edge cases: missing author, API failures, and fallback UI

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

Q2

How would you cache the users list, and what's your approach to loading and error states while the data is in flight?

API & IntegrationsTechnical Trade-offsSystem Design
Author's notes

Talked about caching at the request layer rather than rolling something custom, since the users list doesn't change mid-session.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: how often the users list changes, the expected scale, and whether real-time updates are needed. Then propose a caching strategy (e.g., stale-while-revalidate with React Query) and describe how you'd handle loading and error states with skeleton loaders, retries, and optimistic updates. Emphasize trade-offs between freshness, performance, and complexity.

Pro tip: Mention that you'd use a library like React Query or SWR to handle caching, deduplication, and background refetching, but also explain how you'd implement it manually if needed—this shows depth and pragmatism. Also, highlight the importance of monitoring cache hit rates and error rates to validate your approach.

1. Clarify requirements and constraints

Ask about data volatility, list size, update frequency, and offline support to determine the appropriate caching strategy (e.g., time-based expiry vs. real-time).

2. Choose a caching strategy

Propose a strategy like stale-while-revalidate, cache-first, or network-first, and justify it based on the requirements. Mention using a client-side cache (e.g., React Query, SWR, or Redux) with a TTL and invalidation on mutations.

3. Design loading states

Describe how you'd show immediate feedback: skeleton loaders for initial load, subtle indicators for background refetches, and optimistic updates for mutations to keep the UI responsive.

4. Handle error states

Explain error handling: display user-friendly error messages, provide retry mechanisms with exponential backoff, and fall back to cached data if available. Also, log errors for monitoring.

5. Discuss trade-offs and edge cases

Acknowledge trade-offs like cache staleness vs. performance, and address edge cases such as concurrent mutations, cache invalidation across tabs, and memory management for large lists.

Key Points to Mention

  • Use of stale-while-revalidate pattern to balance freshness and performance
  • Implementation of loading states with skeleton screens and background refetch indicators
  • Error handling with retries, fallback to cache, and user-friendly error messages
  • Cache invalidation strategies on mutations (e.g., after adding/editing a user)
  • Leveraging libraries like React Query or SWR for built-in caching and state management
  • Considerations for scalability: pagination, virtualization, and memory usage

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

Q3

How do you avoid N+1 API lookups when resolving author names for a list of posts?

API & IntegrationsAlgorithms & Data Structures
Author's notes

Pretty direct question.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining the N+1 problem in the context of resolving author names for a list of posts, then explain how to avoid it by batching or caching author data. Emphasize the importance of minimizing network requests and optimizing frontend performance.

Pro tip: Mention that you would also consider using GraphQL or a similar query language to fetch nested data in a single request, and discuss the trade-offs between different approaches.

1. Identify the N+1 Problem

Explain that fetching a list of posts and then making a separate API call for each author's name results in N+1 requests, which is inefficient and can degrade performance.

2. Batch Author Requests

Describe how to collect all unique author IDs from the posts and make a single API call to fetch all authors at once, then map them back to the posts.

3. Implement Caching

Discuss caching author data on the client side (e.g., in memory or using a cache library) to avoid repeated requests for the same author across different posts or pages.

4. Consider Backend or API Changes

Mention that if possible, the backend API could be modified to include author names directly in the posts response, or use GraphQL to fetch nested data in one query.

5. Evaluate Trade-offs

Compare approaches (batching, caching, backend changes) in terms of complexity, performance, and maintainability, and choose the best fit for the application.

Key Points to Mention

  • N+1 query problem and its impact on performance
  • Batching multiple requests into a single API call
  • Client-side caching strategies (e.g., memoization, LRU cache)
  • Using GraphQL or similar technologies to fetch nested data
  • Backend optimization: including author data in the initial response
  • Trade-offs between different solutions (e.g., latency vs. complexity)

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