-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Hello! I'm creating a NextJS app using valtio-yjs and tiptap collab's beta WS server. Everything works fine until I try to create a new proxyMap in the store.
I created minimal version of the issue with three scenarios:
- todos stored as a Map of key value pairs using Valtio's proxyMap --> this works
- todos stored as a Map and bound to a ymap using valtio-yjs's bind() --> this results in an error:
TypeError: snap.myMap.keys is not a function or its return value is not iterable - todos stored as an Array and bound to a ymap --> this works fine.
To see for yourself, go to this vercel deployment, open up an incognito window, and try adding some todos. Valtio-YJS works fine for collaborative arrays and for local maps.
But this deployment (when I bind the proxyMap to the YDoc) crashes immediately.
Any idea why this is happening and how to fix it?
Thanks so much.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels