How to do Optimistic updates with useInfiniteQuery?
Does anyone have an example with Optimistic updates for useInfiniteQuery?
Like the basic CRUD stuff
The biggest current challenge for me is when you are deleting items (like, let's say you have a
getNextPageParams with a limit of 10 items and you are already loaded 50 items (5 pages), then you are deleting 1 item on page 2, and it means that all items inside "page 3", "page 4", etc should "shift to the left" inside our optimistic update, so the "page 2" will contain 10 items)
So, if someone already have a working example it would be huge for me!1 Reply
xenial-blackOP•4y ago
I am duplicating it since no one answered in the #query channel