title: Firestore - how to get document by id in react native
body: <p>Title says it all, when I try to get a document by id from firestore using code:</p>
  
  <pre><code>firestore.collection('my_collection').get('foo')
        .then(snapshot =&gt; {
          snapshot.forEach(doc =&gt; {
            const data = doc.data();
            console.log(doc.id, data);
          });
        })
        .catch(err =&gt; {
          console.log('Error getting documents', err);
        });
  </code></pre>
  
  <p>it throws me this error:</p>
  
  <p><code>FirebaseError: FirebaseError: Function Query.get() requires its first argument to be of type object, but it was: "foo"</code></p>
  
  <p>So I supplied an object with an id: <code>{id: "foo"}</code>
  which gave me another error:</p>
  
  <p><code>FirebaseError: FirebaseError: Unknown option 'id' passed to function Query.get(). Available options: source</code></p>
  
  <p>How can I get a document from collection by id?</p>