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

Yjs transact

skomlaebri opened this issue · comments

Hi,

is there a way in SyncedStore to do doc transact as in Yjs, to reduce the number of update calls?

Pretty simple:

const doc = getYjsValue(store)

doc.transact(() => {
  // Transaction
})

Thanks, that what I ended up doing, I was curious to know if there was a way to avoid the conversion and not having to handle everything with the yjs Syntax.

At this moment there's no build in SyncedStore transactions, but the proposed method should work well!