0.1.0 • Published 3 years ago

react-js-client-side-pagination v0.1.0

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

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)
       }}
>