Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

97
Visualizações
Returning data from Firestore in React Native

I have a function where I get data from Firestore, I would like to show the data from the function in a SectionList in React Native. This is my code:

The query:

function EntryDate() {
  firebase
    .firestore()
    .collection("journal")
    .doc(currentUserUID)
    .collection("entry")
    .get()
    .then((querySnapshot) => {
      querySnapshot.forEach((entry) => {
        const { title, createdAt, getMonth, getDay, sortTime } = entry.data();
      });
    });
}

The variable where I pass the function:

const DATA = [
  {
    title: EntryDate(),
    data: todos,
  },
];

and where I want the data to return:

<SectionList
  style={{ marginLeft: 15 }}
  sections={DATA}
  keyExtractor={(item) => item.id}
  renderItem={({ item }) => <TextLog {...item} />}
  renderSectionHeader={({ section: { title } }) => <Text>{title}</Text>}
/>
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda