I'm struggling with ReactiveUI's learning curve so this question might be naive. Please help me understand the difference between:
ObservableAsPropertyHelper<string> _input
public string Input {get {return _input.Value;}}
and a normal backing variable with RaiseAndSetIfChanged:
private string _input;
public string Input {
get {return _input;}
set {RaiseAndSetIfChanged(ref _input, value);}
}
Are they 2 ways to skin the same cat or are there different use cases/intent for the two options?
ObserableAsProperyHelper (OAPH) helps you wrap a Obserable into a property. So it will provide INotifyPropertyChanged (INPC) notifications for when a new value is placed into your observable.
The second method provides a standard property with INPC notifications.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With