0

I want to add some pagination (with listeners) to my collection but for that I need to first get the next n items and them create new listener from the first doc to the last doc. this operation will make me charged twice - for the get and then, for the unnecessary first listener result. can we avoid this situation?

Bokris Itzhak
  • 911
  • 9
  • 30
  • 2
    Pagination and listeners simply do not work well with each other in Firestore. There is no easy workaround. Do a web search for "firestore pagination with listeners" to see what people have said and done about it. You will find a lot here on Stack Overflow. – Doug Stevenson Mar 03 '23 at 14:15

1 Answers1

1

Currently, Firestore doesn't support pagination with listeners however, as stated by @Doug Stevenson, there are some workarounds that you can do about it that are already here in the community.

You may look at these threads for reference:

Marc Anthony B
  • 3,635
  • 2
  • 4
  • 19