customRef cannot be deep responsive
Vue version
3.2.x
Link to minimal reproduction
Steps to reproduce
1、Define a customRef incoming value as a complex data structure。 2、Modify the properties of complex data structures
What is expected?
View update
What is actually happening?
View not updated
System Info
No response
Any additional comments?
No response
Yes, that is not supported. But that's by design, it's not a bug.
What you could do is 1) use a reactive()
object instead of a plain one and 2) deep watch that object in the custom ref, then trigger() as necessary.