Reactjs doesen’t re render after setState to array

when I finish to get data from my database and I useState setValue and pass the array, render function doesen’t render again.

Code where I setArray

function getNotifiche(){
     onSnapshot(collection(db, "Users",auth.currentUser.uid, "Notifiche"), async (snapNotifiche) => {
            const notifichee = [];
            snapNotifiche.forEach(async notificaDoc => {

                const docRef = doc(db,"Users",;
                const userData = await getDoc(docRef);



This is in the return function:

            return(<div key={index}>
                <label>Invitato da {notifica.invitante.Username} in data{new Date( * 1000).toString()}</label>

So I tried also using setListaNotifiche([…notifichee]) but I get the error: TypeError: Cannot read properties of undefined (reading ‘map’)