-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore subdocuments? #98
Comments
Hi @joakim ! Glad you like SyncedStore. Indeed, unfortunately it doesn't support subdocs yet. However, you could probably workaround this by jumping into "raw yjs" functionality for subdocs. e.g. (pseudocode:
You could probably even use SyncedStore again for the new subdoc by passing the doc to the Let me know whether these suggestions work! |
Hiya YousefED, awesome work on this! Any progress on If not, mind showing how it might work with "raw yjs" functionality? I have tried and not succceeded on the below My attempt:
|
I'm interested as well in having a native subdocuments integration. |
First of all, I have to say that SyncedStore is really nice! Thanks for your work on this.
I wonder, would it be possible to include a subdocument in a
SyncedMap
, and have SyncedStore ignore it so that I can manage it from another provider?I use SyncedStore to persist and sync items (a bit like files), which works great. The data model is a generic
Item
of many kinds (like filetypes), wherecontent
is managed by SyncedStore.This works great for JSON-like kinds of items. I'm now adding support for rich text using Lexical (via svelte-lexical) and have reached a conundrum. Lexical has great support for Yjs collaboration out of the box, with awareness and all, so I'd like to use that. But it requires a
YDoc
passed to it. I don't want to pass ititem.content
, as I still want SyncedStore to managemeta
.If only I could include a subdoc in my data model:
But SyncedStore sees it as any other object and throws an
Error: invalid
on the first value it sees that's a function.Any ideas?
The text was updated successfully, but these errors were encountered: