title: How to add a new Firestore document with a nested collection in React?
body: <p>How would I go about adding a new document in Firebase/Cloud Firestore with a nested collection?</p>
  <pre><code>const createDocument = () =&gt; {
          const documentName = prompt('Enter document name:');
          if (documentName) {
              db.collection('despacito').add({
                  name: documentName,
              })
  }
  </code></pre>
  <p>Any suggestions? Thank you for your time.</p>