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

321
Views
react-native & firebase: request with a condition where in the mappage

Example of a json in my database

enter image description here

request

  firestore()
        .collection(COLLECTION)
        .where("types", ">=", 'lDQJJnsq2osTIWCPLMRg')
        .get()
        .then(querySnapshot => {
            const arr = []
            querySnapshot.forEach(documentSnapshot => {
                const data = documentSnapshot.data()
                const el = {id: documentSnapshot.id, ...data}
                arr.push(el)
            })
            resolve(arr)
        })
        .catch(err => {
            console.log('err ', err )
            reject()
        });
  1. Filer my collection if the property types containt a id specific I don't find how I add a condition 'where' in the mappage ('types') In my logic, If types containt my id ("lDQJJnsq2osTIWCPLMRg") return this object.

  2. Maybe for mobile, it's better to make a call with pagination, I found the method 'startAt' can help for pagination. It's correct ?

I begin with react-native & firebase, so thanks for help.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

For paginating queries you need to use query cursors: https://firebase.google.com/docs/firestore/query-data/query-cursors

  1. use firestore.query to order your collection with orderBy
  2. use startAfter and limit to implement the pagination
about 4 years ago · Juan Pablo Isaza Report
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!