zustand-middleware-yjs
zustand-middleware-yjs copied to clipboard
Zustand middleware that enables sharing of state between clients via Yjs.
Hi, I have been trying to use multiple middleware in a single store (zustand-middleware-yjs being one of them). My implementation looks something like in the picture. Even though the data/state...
It would be useful to have some way to indicate that state is being loaded from peers. This would allow users to show loading indicators or other "please wait, something's...
**Describe the bug** typings for zustand-middleware-yjs cannot be imported, see the error message ------------------------------------------------------- ⚠ Error (TS7016) | Could not find a declaration file for module "zustand-middleware-yjs" . /project/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/zustand-middleware-yjs/dist/yjs.mjs implicitly...
I am trying to use this to sync a react flow store but when yjs syncs react doesn't refresh the page from zustand contents. I tried to add immer but...
See #53. Immer invokes `Object.freeze` on non-primitive values such as arrays and objects. This is how it achieves immutability. This presents two problems for the Yjs middleware: 1. Client updates...
I didn't see a contributor readme anywhere, so let me know if there are any changes you would like me to make to this pr. The goal of this pr...
It seems there is bug in `applyChangesToArray` function when deleting multiple items. In `applyChangesToArray` function to apply changes `array` it is being sorted on index field on `ASC` order then...
- fix link - seems that immer isn't supported
- Fixes #63 - Make a copy of the array before applying changes so that zustand handles the state change correctly.
**Describe the bug** When a remote client updates items in an object array the local client state is not updating "reactively" to the changes. It takes another trigger on the...