title: function.querySnapshot is not a function
body: <p>I'm getting the following error with the code posed below: <code>querySnapshot.forEach is not a function</code>. I also tried using the <code>documentSnapshot</code> function and it did not work either.</p>
  
  <pre><code> constructor(props) {
      super(props);
      var rootref =  firebase.firestore().collection("deneme").doc("2");
      var wholeData = []
      rootref.get()
      .then(function(querySnapshot){
        querySnapshot.forEach(doc =&gt; {
          wholeData.push(doc.data())
           });
      })};
  
  render() {
      return (
        &lt;View&gt;
          &lt;FlatList
            data={this.wholeData}
           `renderItem={this.wholeData}/&gt;
        &lt;/View&gt;
      );
  }};
  </code></pre>
  
  <p></p>