Closed chacha912 closed 1 year ago
I want to try the second approach first. Are there any other opinions?
How about taking the time to design and implement interface #3?
https://liveblocks.io/docs/api-reference/liveblocks-client#Room.subscribe(storageItem)
I want to get a CRDTObject from the root object and execute toJS() after receiving a message with subscribe, but it's not possible.
This might be related to #444.
Description: I received a request asking for a way to directly get the value from a remote-change path. The requestor wants to be able to use the
$.xxxx
path to directly access the value.Currently, when the
$.obj.num path
is changed, the value can be accessed usingdoc.getRoot().obj.num
.If the target path is managed as a constant, we need to extract the key from the path because the path starts with
$.
.A few solutions are as follows:
Pass the updated value along with the path.
Implement a
getValueByPath
method as suggested.event.value
.Why: