Skip to content
RED SAGSkills
hardFrontend Developer interview question

How would you build the frontend for a real-time feature like a shared task board where many users edit at the same time?

What the interviewer wants to hear

  • Use a persistent connection such as WebSockets or Server-Sent Events, with reconnect and backoff
  • Normalised client state updated from server events, with ordering or version numbers
  • Optimistic updates with reconciliation and rollback
  • Conflict handling: server authority, operational transforms or CRDTs for rich collaborative editing
  • Performance: batch updates, avoid re-rendering the whole board, presence indicators

Model answer

I would open a WebSocket connection, or Server-Sent Events if clients mostly listen, with automatic reconnect, exponential backoff and a resync step that fetches missed changes using the last known version. Client state is normalised by id, so an incoming event like "task moved" updates one record and only the affected column re-renders. Every change is applied optimistically with a client-generated id; the server confirms it, assigns a version and broadcasts it. If the server rejects it, I roll back and show a message. For conflicts on simple fields, the server is the authority and uses versions to detect stale writes. For rich shared text, I would use a CRDT library such as Yjs instead of inventing my own merging. To stay fast, I batch bursts of events into one render, virtualise long columns and keep drag state local. I also show presence, like avatars and who is editing a card, and test with simulated latency and dropped connections.

Can you answer it under time pressure?

Take a timed hard round and get scored on every answer.

Start mock interview

More hard Frontend Developer questions