How to paginate data in Firebase in Next.js SSR app?
问题 I am trying to build a next.js server-side rendered blog. For it, I need to paginate the posts data. However, I am yet to find a way to use the query cursors firebase provides to paginate the data. The building query code is: let postsQuery = firebase.firestore().collection('/posts').orderBy('postedOn', 'asc').limitToLast(10); if (currentTagFilter !== 'All') { postsQuery = postsQuery.where('tag', '==', currentTagFilter); } Now, this works for the first page, but I do not know how to request