Skip to content
Discussion options

You must be logged in to vote

Optimistic changes are always rolled back when the mutationFn returns. So before the mutationFn returns, you need to make sure the server change has been synced back into the collection. E.g. here it calls await collection.utils.refetch() https://tanstack.com/db/latest/docs/overview#explicit-transactions

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@craigsmitham
Comment options

@craigsmitham
Comment options

Answer selected by craigsmitham
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants