Interview practice question
Debugging a race condition in complex async flows
Frontend Engineering · Async JavaScript and the Browser · Experienced
An intermittent bug occurs where a page sometimes shows mixed data from two different users after quick account switching. How do you debug and fix it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Reproduce with throttling/delays.
- Trace request lifecycles and state updates.
- Cancel or ignore stale requests on switch.
- Clear caches keyed by user.
- Tests simulating timing.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.