The problem is pretty simple. I want to create a document that has a collection in it. An alternative way of wording it would be I need to make a collection in a document.
I need to be able to do this in React.
Visual: collection -> document -> collection
Here is where I need to add the code:
const addUser = async () => {
await addDoc(usersCollectionRef, {
name: newName,
grade: Number(newGrade),
role: newRole,
hours: Number(newHours),
//Collection Creation should go here as this is where I am making the new document.
})
}
Note: This is react and not react native