bubblezB
Convex Community5mo ago
3 replies
bubblez

Chaining optimistic updates?

I'm building a block based outliner note-taking app. Each bullet point is an entry in the blocks table. Hitting enter creates a new block and hitting tab indents it. Both block creation and indentation are convex mutations (which feels right to me, but happy to be corrected). However I'm having trouble with optimistic updates, especially chained ones, e.g. if I rapidly hit enter then tab. I suspect the reason is that the indent mutation takes a block id, and the client doesn't know what the block id should be... Is there good support for this sort of thing?
Was this page helpful?