TanStackT
TanStack2y ago
1 reply
sacred-rose

`setQueryData` slow to update

I have a reorderable list UI. Its data comes from a query, and I use
setQueryData
to opmistically persist reordered elements, but looks like there is some kind of delay to state update and I can notice a flash of items getting back to old positions before the new order is persisted.
Is there something I can do without need to use a local useState?
Was this page helpful?