That setting in the Admin Reading Settings only determines the number of posts shown using a traditional PHP-based theme. It doesn’t affect what is returned in the WP REST API.
To control how many posts are displayed on each page I think you need to add the per_page parameter to the request. See here for more info.
I think to be able to use the Infinite Scroll hooks here, the solution goes through the creation of a handler that performs a custom request by using the low-level method libraries.source.api.get() which allows to specify params such as per_page fro the request
@cristianbote Any idea how to combine a custom handler that return a custom number of elements per archive page with an Infinite Scroll hook such as useArchiveInfiniteScroll ?
It should be possible, because useArchiveInfiniteScroll works with links and uses the next property of archive data objects to get the next link, whatever the number of posts of each archive page.
Hey @juanma, another option would be specifying per_page for all the REST API requests using the state.source.param property, though that would change the number of posts for all archives.