Hey folks, I'm using response.nextPage() and response.previousPage() from a paginated API
Hey folks, I'm using response.nextPage() and response.previousPage() from a paginated API response.nextPage() works perfectly — it takes me from page 1 to 2 to 3, etc.
But when I call response.previousPage() from, say, page 3, it jumps directly back to page 1 instead of going to page 2. The same happens from any page — it always jumps back to the first page.
I'm updating my responseRef.current after every call, so I’m sure I’m using the most recent response object.
Is there anything special I need to include in the findMany query (like cursors or tokens) to make previousPage() work correctly?
Has anyone faced this behavior where previousPage() doesn’t respect the current page state?