Debug a Frontend Component That Shows Wrong API Results
Company: Tradedesk
Role: Frontend Engineer
Category: Software Engineering Fundamentals
Difficulty: medium
Interview Round: Onsite
Overview: A front-end debugging question in which a React component that fetches data sometimes shows results that do not match the current input, even though each API response is correct. It tests how the candidate reproduces a timing-dependent bug, finds the root cause, fixes it in the effect, handles cancellation errors, and verifies the fix with a deterministic test.