Is it alright to have 2 async await function inside the useEffect?

I have these async await codes: Would it cause problems if I have 2 async await function inside my useEffect hook?

const [size, setSize] = useState(0)

const getData1 = async () => {
  const citiesRef = firestore.collection("users");
  const snapshot = await citiesRef
    .where("item.itemName", "==", selected)
    .where("selected","==", true)
    .get();
  setSize(snapshot.size)
};

const [size2, setSize2] = useState(0)

const getData2 = async () => {
  const citiesRef = firestore.collection("users");
  const snapshot = await citiesRef
    .where("item.itemName", "==", selected)
    .where("selected","==", false)
    .get();
  setSize2(snapshot.size)
};

 useEffect(() => {
    if (selected) {
      getData1();
      getData2();
    }
  }, [selected]);

Answer

That should be fine as long as you are not blocking the process by making the function inside the useEffect async and awaiting in there like:

 useEffect( async() => {
    if (selected) {
      await getData1();
      await getData2();
    }
  }, [selected]);

The functions you are calling in useEffect are returning promises instantly (non-blocking) that later resolve, the example I provide makes the useEffect function wait for the promises to resolve (blocking) before ending the function call.