erquhartE
Convex Community3y ago
4 replies
erquhart

Optimistically deleting an optimistically inserted object

If I optimistically add an item to a list, and then delete before the operation has completed, a mutation will be attempted at some point with the fake id from the optimistic item, which fails. The result for the user is basically a flicker and harmless failure, but I'm curious if there's an approach I'm not considering here.

For now my solution is to block removal until insertion is complete (just checking if the id is a uuid for this).
Was this page helpful?