-
From here: #69 (comment) it looks like observable sets are supported, but I can't find any documentation on them. And from earlier in that same thread it's suggested that sets would have to be of strings (not object references): #69 (comment) Trying it out seems to confirm this:
Just want to confirm that this is intended behavior and suggest that it would be good to add to the docs somewhere if it is. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
-
Ahh. This makes sense. The copying of non-observable objects slipped through my reading. Not sure whether it's because I read up too fast or if it's not clear in the docs. Thanks. |
Beta Was this translation helpful? Give feedback.
ObservableSet
works with anything aSet
does, but same as any observable collection it'sdeep
by default, so it first converts the value toobservable
, which creates a copy - so it actually stores a different reference. I agree, it's confusing.Either make the object observable before adding it to the set or make the set shallow.