Optimistic delete with infinite (i.e. paginated) query? #7789
Answered
by
TkDodo
patrick-r-son
asked this question in
Q&A
-
I have a UI consisting of an infinite list of items, and the user can delete items with a mutation. What kind of considerations need to be made when doing optimistic removals to an infinite paginated query? Does anyone have a real-life-applicable example? |
Beta Was this translation helpful? Give feedback.
Answered by
TkDodo
Jul 26, 2024
Replies: 1 comment 3 replies
-
with optimistic updates, you ideally do exactly what the server will also do. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you can shift items around from the follow-up pages, but then the last page will only have 9 items until you refetch. I don't think it matters much which page is the one where one item is missing