I’m a novice when it comes to CRDT, so I’m just curious how this could happen given CRDT?
Yjs works great under normal circumstances, but a rare situation with React causes an infinite loop of updates where “A” becomes “AA” then “AAA” and so on. It only happens when using React dev server, not in production. Based on my logs, none of my code is called. The only place where my code inserts text into a document is in Binding and it is not called when the infinite loop happens.
I’m using Yjs, quill, y-quill, y-websocket, react-quill, quill-cursors.
In my app, quill editors are opened and destroyed frequently. This is not a problem. The only problems occur when the dev servers are restarted. Somehow Yjs gets into a state where it starts updating the doc without any user input and each update then triggers another update, creating an infinite loop.
I suspect that this is caused if doc has multiple bindings, but I would still think CRDT would prevent this. Why doesn’t it?
Any insights of what would cause this scenario would be much appreciated?