DEV Community

Discussion on: How to create load more logic in React

Collapse
 
shubhamverma profile image
Shubham Verma

Great article.
There is one logical error. For array of length 9 and LIMIT 4, the last element whould be missed.
newShoreMore would be <=
const newShowMore = newIndex <= (LENGTH - 1);