Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

98
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda