I cannot seem to get any docs from firebase in my react-native project.
This is the code:
async function GetUsers() {
firebase.firestore()
.collection("Users")
.get()
.then(function (querySnapshot) {
console.log(querySnapshot);
querySnapshot.docs.forEach(function (doc) {
console.log(5);
});
});
}
The function is called in
componentDidMount() {
GetUsers();
}
But the console is never fired because the docs is always empty.
The connection is definitely setup correctly because I can add docs.
What am I doing wrong?