Import this in your client-side component
MyComponent.tsx
import { usePagination } from "react-amazing-hooks";
Api | Description | Type | Return Type | Example |
---|---|---|---|---|
usePagination | A hook for handling pagination in a data array. | PaginationResult | Example* | const { currentPage, nextPage, paginatedData } = usePagination(dataArray, 10); |
Check the PaginationResult
in the 'Types' tab. *
Check the 'Example' tab above the table for an exhaustive example. *