title: Initial value of ObservableAsPropertyHelper when subscription is deferred
body: <p>I recently started to use OAPH in my ViewModels.</p>
  
  <p>To improve performance I'm using deferred subscription.</p>
  
  <p>Given the following model class:</p>
  
  <pre class="lang-cs prettyprint-override"><code>public class Model : ReactiveObject
  {
      [ReactiveUI.Fody.Helpers.Reactive]
      public string Value { get; set; }
  }
  </code></pre>
  
  <p>And the view model:</p>
  
  <pre class="lang-cs prettyprint-override"><code>public class ViewModel : ReactiveObject
  {
      private readonly Model _model;
      private readonly ObservableAsPropertyHelper&lt;string&gt; _propertyOAPH;
  
      public ViewModel(Model model)
      {
          this._model = model;
          this.WhenAnyValue(x =&gt; x._model.Value)
              .ToProperty(this, nameof(this.Property), out this._propertyOAPH, deferSubscription: true, scheduler: RxApp.MainThreadScheduler);
      }
  
      public string Property =&gt; this._propertyOAPH.Value;
  }
  </code></pre>
  
  <p>The first time view model's property will be accessed, the source observable will be subscribed and the default OAPH value will be returned.</p>
  
  <p>As in my example I'm using the <code>WhenAnyValue</code> extension method, the resulting observable will start with a value.
  Once this value is observed by the OAPH, the ViewModel will emit a PropertyChanged event.</p>
  
  <pre class="lang-cs prettyprint-override"><code>var model = new Model { Value = "value" };
  new ViewModel(model)
          .WhenAnyValue(x =&gt; x.Property)
          .Select(p =&gt; p ?? "null")
          .Subscribe(p =&gt; Console.WriteLine($" - ViewModel property: {p}"));
  
  /**
  * - ViewModel property: null
  * - ViewModel property: value
  */
  </code></pre>
  
  <p>Is there a way for the OAPH initial value to be the first value of the source observable?</p>
  
  <p>I understand that from a pure reactive perspective having the initial value temporarily null or wrong (if OAPH's initial value is set) is not an issue. But on iOS, TableViewCell height is calculated according to its content when initialized (if auto layout is used). TableViewVell height is not updated afterward. </p>
  
  <p>I'm investigating first if there is an easy way to "solve" this problem with reactiveUI. If there is none, I'll investigate on a pure iOS solution.</p>
  
  <p><em>Notes:</em></p>
  
  <ul>
  <li>ViewModel's property must be observed on the main thread as it will trigger UI changes</li>
  <li>Setting a default value to the OAPH is not an option as the source observable first value (Model property value) may change before subscription.</li>
  </ul>