Yjs transact
skomlaebri opened this issue · 3 comments
skomlaebri commented
Hi,
is there a way in SyncedStore to do doc transact as in Yjs, to reduce the number of update calls?
gustavotoyota commented
Pretty simple:
const doc = getYjsValue(store)
doc.transact(() => {
// Transaction
})
skomlaebri commented
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.
YousefED commented
At this moment there's no build in SyncedStore transactions, but the proposed method should work well!