Can someone help me how to setup Google Firestore pagination for my API with express. I found how to change page with button click but I want to change pages from url query like this ex. '127.0.0.1/data?page=2'let first = db.collection('cities').orderBy('population').limit(3);let paginate = first.get().then((snapshot) => {let last = snapshot.docs[snapshot.docs.length - 1];let next = db.collection('cities').orderBy('population').startAfter(last.data().population).limit(3);});
Submitted May 20, 2020 at 04:49AM by Mikelsk
No comments:
Post a Comment