title: Buffer until with redux-observable and rxjs
body: <p>Is there a pattern for making an <code>redux-observable</code> epic buffer until a value in store is true?</p>
  
  <pre><code>const uploadsCompleteEpic = (action$, store) =&gt; {
    return action$
      .ofType(actionTypes.UPLOAD_SUCCESS)
      .bufferWhen(store =&gt; store.getState().remaining -1 === 0)
      .do(action =&gt; console.log(action))
      .ignoreElements();
  };
  </code></pre>
  
  <p>The above doesn't work because the function in <code>bufferWhen</code> is not an Observable. I've also tried wrapping the buffer function in <code>Observable.single</code> with no success.</p>