Is there a way to get previous page of products with JavaScript Buy SDK similar to "fetchNextPage"?

New Member
3 0 0

I am using the Buy SDK, and trying to figure out pagination.  The SDK provides a "fetchNextPage" function, but does a "fetchPreviousPage" function not exist?  Is there another specific way I should be approaching this?

My working code:

    client.fetchNextPage(collection)
        .then((nextPageOfProducts=> {
            console.log(nextPageOfProducts)
        })
 
Now just need to figure out how to go backwards

 

0 Likes