holdenH
Convex Community3y ago
13 replies
holden

Any way to undo/redo mutations?

Has anyone found a good way to implement undo/redo in a Convex app?

I was previously using Liveblocks storage to store document state, and migrated to Convex. Overall happy with Convex so far, but the one Liveblocks feature I'm sad to lose is the useUndo, useRedo, useCanUndo, useCanRedo hooks:
https://liveblocks.io/docs/api-reference/liveblocks-react#useUndo

Those made it really easy to add undo/redo buttons to my app, and have it work across tabs/users.

It doesn't look like Convex has anything built in for this? Anyone know if there's a good 3p library that might help here?

This blog post convinced me I probably don't want to implement it myself 😉
https://liveblocks.io/blog/how-to-build-undo-redo-in-a-multiplayer-environment
Was this page helpful?