Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

96
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!