Replies: 2 comments 6 replies
-
Usually you are encouraged in the reactive world to monitor the property with an observable and build up your on set actions from there. You can use ObservableAsPropertyHelper etc |
Beta Was this translation helpful? Give feedback.
-
In ReactiveUI, setters are always 100% boilerplate, you should never be doing anything in a property setter other than calling RaiseAndSetIfChanged. Instead, use WhenAny in the constructor, which will automatically suppress dupes for you |
Beta Was this translation helpful? Give feedback.
-
RaiseAndSetIfChanged returns newValue, and the documentation even states that this is normally discarded. But what's the reasoning behind this redundant return value? Why not return bool like other MVVM frameworks, so in the setter you can do stuff depending on whether or not the property has actually been changed?
Beta Was this translation helpful? Give feedback.
All reactions