Instead of using four top-level YMaps (nodesMap, edgesMap, codeMap, richMap), this PR uses a root YMap rootMap, so that all fields are removable for possible future schema updates.
Consider using a single top-level YMap: Top-level shared types cannot be deleted, so you may want to structure all your data in a single top-level YMap, eg. yDoc.getMap('data').get('page-1').
Instead of using four top-level YMaps (
nodesMap
,edgesMap
,codeMap
,richMap
), this PR uses a root YMaprootMap
, so that all fields are removable for possible future schema updates.Before:
After:
Also added four helper store.functions:
Ref from Yjs document: