Preact hook that import pagination state to the component.
Should always be at the top of the component!
Optional
import { usePagination } from '@nosto/preact'export default () => { const { pages } = usePagination() return pages.map((page) => <li> {page.current ? <span>{page.page}</span> : <a> {page.page} </a>} </li>)} Copy
import { usePagination } from '@nosto/preact'export default () => { const { pages } = usePagination() return pages.map((page) => <li> {page.current ? <span>{page.page}</span> : <a> {page.page} </a>} </li>)}
Preact hook that import pagination state to the component.
Should always be at the top of the component!