Firebase – Why setState don't work inside of an async function which is nested inside of an useEffect?
I have an async function (getDataFromDB) which I run inside of an useEffect. The function gets data from firestore. The problem is I can't set state to data from firebase. I get the reference to data, I can see the…