API Design · Senior · Question 42 of 75
How do you design pagination for a feed that must stay consistent while new items arrive?
- 1Return the whole feed every time
- 2Offset pagination with page numbers
- ✓Correct answer: Cursor pagination over a stable sort key; new items appear on refresh (a 'newer than' cursor) without shifting older pages
Explanation
Separate 'load newer' and 'load older' cursors are typical for timelines.