Hi, I am building a SolidJS (which is similar to React) web application that edits complex hierarchical objects simultaneously.
To store the information, I used Y.Map in the root with nested Y.Maps and Y.Arrays.
I first tried observeDeep function to observe the changes in the root Y.Map and synchronize it with SolidJS Store.
It works correctly when adding new values, but it does not work at all for the case of removing items because we should know the key to remove from the SolidJS Store.
However, because the event in observeDeep only shows the last key, not the full path to the object, so I cannot figure out which key inside our hierarchy is removed.
To solve this problem, I think there are two naive solutions. The first one is using for loop to check all keys in the hierarchy and find the key to remove. The other way is finding a method to track the full path of the key, which seems to be more efficient if it is available.
So, here is the qusetion. Can I find the full path of the key in the nested hierarchy? If it couldn’t, is there any solution for my case?