Pagination in React Thoughts
Check out the pagination I created and designed!
When developing a pagination component within a tech company there’s a few things to think about:
Some of the things I heavily considered when building pagination include:
Total Items
Page sizes (10, 20, 50, 100, Show All.) to display number of items per index
SIZES = [
ALL: infinity;
10: XS,
20: SM,
50: MD,
100: LG,
];
totalItems = [
1: XS, ALL,
51: XS, SM,
101: XS, SM, MD,
201 : SM, MD, LG,
];
Items Per Page select component
Page Number select component
Setting up useState
[currentPageSize, setCurrentPageSize]
[currentPageSelection, setCurrentPageSelection]
Chevron icons for previous and next
Display “of items”
Localizations
Allow developers change text language depending on who they’re building for
Define variables for the following: