You’re not receiving notifications from this thread.
PAGY with Rails API Only
I've built a Rails API and have a separate Nuxt/Vue app for my front end. Looking to add server side pagination with Pagy and was wondering how i best to call the next 'X' number of results.
Pagy is working fine and giving me my first 20 records, but to call the next 20 I'm a little confused. Do i need to specify the URL from the front end as in 'localhost:3000/contacts?page=2' and send that, or can i pass some params like [:next] as mentioned in the docs. Has anyone had success with this or has an example?
Normally, you want to pass the next page number into the URL like you mentioned. That's how pagination links work when you display render them. Then the server knows which group of 20 records to grab next.