You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, this is more of a "let you know" than a "this needs fixing" message—someone else may come across this.
If you try to assign Liveblocks storage to a Vue ref (reactive variable) it won't work:
const { root } = await room.getStorage()
root.set('list', new LiveList())
const list = ref()
list.value = root.get('list')
// ERROR: Cannot read private member from an object whose class did not declare it
list.value.push(1)
It works fine if you use a function to return the storage instead:
const { root } = await room.getStorage()
root.set('list', new LiveList())
const list = ref()
list.value = () => root.get('list')
// Works fine
list.value().push(1)`
@ctnicholas
Hi, this is more of a "let you know" than a "this needs fixing" message—someone else may come across this.
If you try to assign Liveblocks storage to a Vue ref (reactive variable) it won't work:
It works fine if you use a function to return the storage instead:
I've written exactly why this doesn't work in a CodeSandbox example:
https://codesandbox.io/s/liveblocks-proxy-storage-fix-eitb1?file=/src/index.js
I don't know if this is a problem that needs fixing, but it might be something to be aware of!
Discord: https://discord.com/channels/913109211746009108/913158542565994606/941328794130722868
The text was updated successfully, but these errors were encountered: