View information from a specific Firebase collection using Reactjs

Asked

Viewed 12 times

0

Good evening, I’m trying to display some information of a collection in firebase however I can not display this information, I am passing a collection ID and is returning in the log the data I want but I can not display in the browser in html this information.

        useEffect(()=>{
    // retrieve a document
    const chama = firebase.firestore().collection('cursos')
    chama.doc(id)
    .get()
    .then(snapshot => {
    const document = snapshot.data()
    // do something with document
    console.log(document);
    })
    }, [])

inserir a descrição da imagem aqui

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.