Interview practice question
Optimistic reordering in a drag-and-drop list
Frontend Engineering · State Management and Data Fetching · Experienced
Users reorder items in a drag-and-drop list, and the order sometimes jumps back or ends up wrong after saving. How would you fix it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Optimistic local reorder.
- Send order changes with versions; serialise saves.
- Fractional indexing for positions.
- Cancel stale refetches during drag.
- Reconcile with server on conflict.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.