Does ref() work with Set? #10834
Answered
by
LinusBorg
anchan42
asked this question in
Help/Questions
-
I can't get it to work with Set but reative() works fine. Is this intensional or a bug? The watch on the set below would not work but if I change is to use reactive() instead, it would work.
|
Beta Was this translation helpful? Give feedback.
Answered by
LinusBorg
Apr 29, 2024
Replies: 1 comment 1 reply
-
Watch is not deep by default. if you put the set in a ref, and then watch the ref, then the watch only triggers if you assign a new value to the ref, not if you mutate the set within the ref. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
LinusBorg
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Watch is not deep by default. if you put the set in a ref, and then watch the ref, then the watch only triggers if you assign a new value to the ref, not if you mutate the set within the ref.