title: Error while rendering an array from firestore to react native
body: <p>i have an array that i am trying to read and store in a state however, with the code below, here is the error i get: &quot;function collectionReferenace.doc() requires its first argument to be of type non-empty string, but it was undefined&quot; any idea why this is happening and what is the solution?</p>
  <pre><code>componentDidMount(){
          dbh.collection('Groups').doc(this.props.route.params.groupName)
          .collection('Enrolled').doc('ids').get()
          .then(querySnapshot =&gt; {
              querySnapshot(doc =&gt; {
                  this.setState({
                      playerIDs: doc.data().players
                  })
              })
          })
          console.log(this.state.playerIDs)
      }
  </code></pre>
  <p>the <code>this.props.route.params.groupName</code> is passed from the navigation of the previous screen. When I set a constant in the render function to it and call that variable it works fine.</p>
  <pre><code>    render() {
      const groupName = this.props.route.params.groupTitle
  return
  &lt;Text&gt;{groupName}&lt;/Text&gt;
  </code></pre>
  <p>for your reference, here is how i am getting that route.param</p>
  <pre><code>&lt;GroupComponent onPress = {
  () =&gt; this.props.navigation.navigate
  ('Attendance', {groupTitle: group.GroupName, groupID: group.id})
  } /&gt;
  </code></pre>