-
Notifications
You must be signed in to change notification settings - Fork 20
Pagination
Petter Eriksson edited this page Dec 16, 2017
·
2 revisions
Implementing pagination with om.next was not straight forward (to us). We implemented pagination specifically for browsing products and we never got to generalizing the idea.
When implementing pagination, we only needed it to browse products. We had very few products at the time, so we implemented pagination by:
- For each browse filter:
- On the server:
- Return a vector of product ids with the correct order.
- Client:
- Given all the product ids to browse,
- Request data for the products you're presenting to the user.
- Given all the product ids to browse,
- On the server:
This wouldn't scale if you had a lot of products. A more general cursor based pagination is possible, but you won't find it in our codebase.