await ref.recipes.forEach(async(doc) => {
await firebase.firestore().collection("recipes").doc(doc).get()
.then ((snap) => {
if (snap.exists) {
tempList.push(snap.data());
setDataList(tempList);
console.debug('first');
})
.catch((error) => {
alert(error.message);
})
})
}
console.debug('second');
await ref.recipes.forEach(async(doc) => {
await firebase.firestore().collection("recipes").doc(doc).get()
.then ((snap) => {
if (snap.exists) {
tempList.push(snap.data());
setDataList(tempList);
console.debug('first');
})
.catch((error) => {
alert(error.message);
})
})
}
console.debug('second');