title: How to get rid of initial value of Variable in RxSwift
body: <p>I have been working on RxSwift, I am using a <code>Variable</code> in RxSwift which is hooked(bind to) to <code>UICollectionView</code>. Now knowing that <code>Variable</code> extends from <code>Behavior Subjects</code> I had to create a <code>Variable</code> with some dummy initial value.</p>
  
  <pre><code> var myArray = Variable&lt;[MyDataModel]&gt;([MyDataModel(data: "{:}")])
  </code></pre>
  
  <p><code>MyDataModel</code> is a struct that takes <code>json</code> as a init parameter.(As MyModel has nothing to with the question that follows am not posting the structure of it here)</p>
  
  <p>Now, when I hook it to collectionView, I know that I should ignore the first signal emitted so I use <code>skip(1)</code></p>
  
  <pre><code>myArray.asObservable().skip(1).bind(to: collectionView.rx.items(cellIdentifier: "test", cellType: MyCollectionViewCell.self){
          //cell implementation    
  })
  </code></pre>
  
  <p>Though above code works, it solves the problem partially. Though the first change in the <code>value</code> of <code>myArray</code> is ignored, but when I append the actually data to <code>myArray</code> later using</p>
  
  <pre><code>myArray.value.append(someNewData)
  </code></pre>
  
  <p>it emits the notification and unfortunately this time <code>myArray.value</code> has two values (dummy one I added while initializing and one that actually triggered <code>onNext</code>)</p>
  
  <p>So as a work around, what I do is before blindly appending data to <code>myArray.value</code> I check if it has dummy object I added, if yes I remove it and add the actual object.</p>
  
  <p>Though work around works, makes my code looks very ugly and non Rx in a way. I believe there must be a proper way to deal with it as it is a very fundamental problem working with <code>Variable</code>.</p>
  
  <p>I would really appreciate your thoughts on the same.</p>