title: Firebase rxfire subscription check my code
body: <p>Hi since rxfire is rather new to firebase I just want to check that this is the best way to subscribe to changes with it, the code below works.</p>
  
  <p><a href="https://github.com/firebase/firebase-js-sdk/blob/master/packages/rxfire/docs/database.md" rel="nofollow noreferrer">https://github.com/firebase/firebase-js-sdk/blob/master/packages/rxfire/docs/database.md</a></p>
  
  <pre><code>import firebase from 'firebase/app';
  import { database, initializeApp } from 'firebase';
  import { stateChanges, ListenEvent, object } from 'rxfire/database';
  import { map } from 'rxjs/operators';
  
    const db = firebase.database();
    const ref = db.ref('_data');
    stateChanges(ref).subscribe(change =&gt; {
  
      // console.log(change);
      //console.log(change.snapshot.key);
      //console.log(change.snapshot.val());
  
      if (change.snapshot.key == '_appConfig') {
        this._appConfig = change.snapshot.val();
        console.log(this._appConfig);
      }
  
  
    });
  </code></pre>
  
  <p>Blog ref: <a href="https://firebase.googleblog.com/2018/09/introducing-rxfire-easy-async-firebase.html" rel="nofollow noreferrer">https://firebase.googleblog.com/2018/09/introducing-rxfire-easy-async-firebase.html</a></p>