Easy integratable pagination component for React Apps using react-paginate.
Apart from the "react" package, install the react-paginate module:
npm install react-paginate --save
Takes the following three props:
- itemsPerPage : Total items count to display per page.
- items : List of items.
- handlePageChange : To handle application logic on page change event.
<PaginatedItems
itemsPerPage={pageSize}
items={itemList}
handlePageChange={handlePageChange}
/>