-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]: Liveblocks is temporarily duplicating frequently changed array values #1051
Comments
Hi @noahbaron91 - thank you for reporting this bug. Please excuse our delay in response here – part of our support team was out for holidays. This looks like an instance of a bug we already have on our radar (see #628 and #731). We have a potential fix for this, currently in draft in #1002, which still needs to be unit tested properly, and verified for production-readiness. We'll keep you posted on when we have an official release for this bug fix. If you're willing and able to help us verify that this fixes your issue in the mean time, you could:
Does that fix your issue as expected? Thanks in advance! 🙏 |
No problem @nvie, |
That's unfortunate, we'll have to keep digging a bit more then. Thanks for trying it out and letting us know, @noahbaron91. |
Describe the bug
Frequently changing array values are being temporarily duplicated by liveblocks when using the Zustand connector.
I prepared a simple example that displays this issue, similar to the project I'm working on: https://github.com/noahbaron91/liveblocks-array-bug / https://stackblitz.com/github/noahbaron91/liveblocks-array-bug
In this example, a layer is moving in and out of another layer at a quick rate. Liveblocks will randomly duplicate the stored ids when updated at a fast rate (approx 50ms per action).
I have noticed that it quickly recovers, but this short duplication is causing issues for me.
Steps to reproduce the behavior:
Expected behavior
Liveblocks should not duplicate array values and should instead stay consistent with the Zustand storage
Illustrations
liveblocks-bug.mp4
Environment (please complete the following information):
"@liveblocks/client": "^1.2.1",
"@liveblocks/zustand": "^1.2.1",
Chrome 115 on macOS (Ventura)
The text was updated successfully, but these errors were encountered: