react-js-client-side-pagination
v0.1.0
Published
This package will allow you to implement the pagination on the client-side.
Downloads
6
Readme
React JS package for client-side pagination
This package will allow you to implement the pagination on the client-side.
Installation
npm install react-js-client-side-pagination
Importing the library
import ClientSidePagination from 'react-js-client-side-pagination'
Example usage
<ClientSidePagination
recordsPerPage={10}
page={currentPage} // current page
items={collection} // array - all the items for all the pages
onChange={(page, itemsForPage) => {
setCurrentPage(page)
setCurrentPageItems(itemsForPage)
}}
>