[ ] You can use pagination or infinite scroll. Decision is up to you.
[ ] query parameters:
[ ] limit: by default 25. you can specify product count to be fetched at once.
[ ] offset: by default: 0. it specify product count to be passed.
Sample Case:
if you fetch first 25 products on page 1,
and then you want to fetch products from 25 to 50 for page 2
you need to set offset 25 and url should be products?limit=25&offset=25
and then you want to fetch products from 50 to 75 for page 3, the url => products?limit=25&offset=50
[ ] By using these two parameters, you can create pagination or infinite scroll
Sample react pagination and infinite scroll components, you can use different libraries!
[ ] You can use pagination or infinite scroll. Decision is up to you.
[ ] query parameters:
[ ]
limit
: by default25
. you can specify product count to be fetched at once.[ ]
offset
: by default:0
. it specify product count to be passed.Sample Case:
if you fetch first 25 products on page 1, and then you want to fetch products from 25 to 50 for page 2 you need to set offset
25
and url should beproducts?limit=25&offset=25
and then you want to fetch products from 50 to 75 for page 3, the url =>products?limit=25&offset=50
Sample react pagination and infinite scroll components, you can use different libraries!