title: forEach loop for getting data firebase
body: <p>I have a code: </p>
  
  <pre><code>const { uid } = firebaseConfig.auth().currentUser;
  const ref = db.collection('categories').doc(uid);
  
  ref.onSnapshot(
    snapshot =&gt; {
      snapshot.forEach(item =&gt; console.log(item.data()));
    },
    err =&gt; {
      console.log(`Encountered error: ${err}`);
    }
  );              
  </code></pre>
  
  <p>and I got error: <code>Uncaught TypeError: snapshot.forEach is not a function</code>
  Where did I make a mistake?
  firebase version: <code>^6.2.0</code></p>