DEV Community

Discussion on: Quickly implement infinite scroll with Next.js and react-query

Collapse
 
usavas profile image
savas

Hello! Thank you for this great article.

I would like to ask you how come this loads 20 items per page? I mean it is not written in the documentation, either. Is it the default?

Collapse
 
frontenddeveli profile image
Elisabeth Leonhardt

Hi: that is the default of the Rick and Morty API: if you don't change the size param, they return 20 items. The amount of items returned will always depend on the API you are using and if it offers a parameter to change it, you can of course change it.