Skip to content

Confirming that Observable Sets don't work with Object References #3549

Answered by urugator
focomoso asked this question in Q&A
Discussion options

You must be logged in to vote

ObservableSet works with anything a Set does, but same as any observable collection it's deep by default, so it first converts the value to observable, 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.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by focomoso
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants