YousefED / SyncedStore

SyncedStore CRDT is an easy-to-use library for building live, collaborative applications that sync automatically.

Home Page:https://syncedstore.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Undo Redo Support

websiddu opened this issue · comments

Is there a way to do undo/redo using Synced Store?

Yes @websiddu ! You should be able to use the regular Yjs undomanager, e.g.:

const val = getYjsValuestore.value)

const undoManager = new Y.UndoManager(val)

// Do stuff to val (Let undoManager capture the updates)

undoManager.undo() // Revert the captured updates

Does this answer your question?