title: How to use Firestore realtime updates (onSnapshot) with redux-observable/rxjs?
body: <p>I am able to setup redux-observable with normal Firestore queries</p>
  
  <pre><code>export const getStatementsEpic = (action$, store) =&gt; {
    return action$.ofType(GET_STATEMENTS)
      .filter(() =&gt; {
        const state = store.getState()
        return state.auth.user
      })
      .mergeMap(() =&gt; {
        console.log('action', store.getState().auth.user.uid)
        const db = firebase.firestore()
        db.settings({ timestampsInSnapshots: true })
        const query = db.collection('users')
          .doc(store.getState().auth.user.uid)
          .collection('statements')
          .orderBy('uploadedOn', 'desc')
          .limit(50)
        return query.get().then(snapshot =&gt; {
          console.log('Should have gotten snapshot')
          return getStatementsSnapshot(snapshot)
        })
      })
  }
  </code></pre>
  
  <p>But I want to convert this to be realtime, I tried changing </p>
  
  <pre><code>return query.get().then(snapshot =&gt; {
  </code></pre>
  
  <p>to </p>
  
  <pre><code>return query.onSnapshot(snapshot =&gt; {
  </code></pre>
  
  <p>But it does not work ... I guess this is not a promise? How do I resolve this? </p>