@jakwakwa
Posted
Hi Greg,
I like how you're only displaying 4 rows of jobs. Any tips on the best ways to do this? I used React. My solution has all 50 jobs per page.
I really like your solution overall as well. 👍
@greg-solomon
Posted
@jakwakwa
Hey! Thanks for checking it out.
I just used a state variable for page and page size. Then clicking on the load more button increments the page variable and renders more items from the array.
@jakwakwa
Posted
@greg-solomon thank you @greg-solomon
@jakwakwa
Posted
@greg-solomon I see now that you used Redux. That is probably how you limit the number of jobs loaded at first, correct?
@greg-solomon
Posted
@jakwakwa
No, if you look at pages/index.tsx and components/home/Grid.tsx you should be able to see how it works.
There's a showCount variable in my page that gets passed to my grid component and then use it in a .slice() before the .map()