In my use case I only need to pass through the XML Fragments to different rich text editors, not mutate or read the rendered contents directly. I have many, and they are nested.
Even after customizing applyPatch to pass-trhough the XML and text YJS objects, immer-yjs calls toJSON on the doc instance, which makes the XMLFragment transform into a string.
Furthermore, this string never gets updated because the text events are never listened to.
The other suggested option is keeping the XML fragment objects outside immer. In this case, do you have any suggestions to make these reactive?
SyncedStore does implement all of this, but the mutable/FRP API is not for everyone.
In my use case I only need to pass through the XML Fragments to different rich text editors, not mutate or read the rendered contents directly. I have many, and they are nested.
Even after customizing
applyPatchto pass-trhough the XML and text YJS objects, immer-yjs callstoJSONon the doc instance, which makes the XMLFragment transform into a string.Furthermore, this string never gets updated because the text events are never listened to.
The other suggested option is keeping the XML fragment objects outside immer. In this case, do you have any suggestions to make these reactive?
SyncedStore does implement all of this, but the mutable/FRP API is not for everyone.