Open hichem-dahi opened 4 months ago
any update here?
I don't think we should clone the data and update the clone eagerly - it would be very inefficient and could cost extra memory. The root cause is that we didn't properly trigger the data when they updates, but also because we are dealing with multiple Vue instances (one in host, one in devtools, where watching on a forgien reactive object won't triggers properly. I think this would need a fix with another approach
@antfu, I've made it possible to update only the necessary nested properties using the deepSync
function. Can you check?
@antfu I've removed cloning. I've used toRefs(payload.state)
to reference the objects. It seems to be working.
Looks great; I will test it a bit. Thanks a lot for being patient on this!
I looked into it, but it seems that using toRef
in template isn't a good practice. I end up with a different approach: 418a22ed624584a25eab2ed4880147e6d572eb32, which is released as v1.3.9. Please give it a try and let me know if it solves your cases. Thanks!
I left a comment here. It solves the initial issue. However, when modifying from the StateEditor, the change isn't synced.
fixes #643