@alobato/use-pagination

React hook to use pagination

Usage no npm install needed!

<script type="module">
  import alobatoUsePagination from 'https://cdn.skypack.dev/@alobato/use-pagination';
</script>

README

usePagination

React hook to use pagination

Note: This is using the new React Hooks API

You'll need to install react, react-dom, etc at ^16.8.0 or above

Install

yarn add @alobato/use-pagination

Usage

import useKeyPress from '@alobato/use-pagination'
...
const [paginationProps, currentPageItems] = usePagination(data)