I am trying to paginate documents with firestore beta. I am following the official docs
I see there is a pageSize param to say how many documents you want to show, b
Firestore range queries are based on an having anchor document. So you must know the (order-by properties of the) document that the range start with, and then use ref.startAfter(anchorDdoc).limit(10)
(or ref.startAfter(valueOfAnchorDoc).limit(10)
) to get the next page.
The Firestore server-side Admin SDKs have an offset() call that allows the server to determine the document to starts at. But the client-side SDKs do not have this method.