- usePagination(
options?: { width?: number },
): {
current?: Page;
first?: Page;
last?: Page;
next?: Page;
pages: Page[];
prev?: Page;
resultsFrom: number;
resultsTo: number;
totalPages: number;
} Parameters
Optional
options: { width?: number }
Returns {
current?: Page;
first?: Page;
last?: Page;
next?: Page;
pages: Page[];
prev?: Page;
resultsFrom: number;
resultsTo: number;
totalPages: number;
}
Preact hook that import pagination state to the component.
Should always be at the top of the component!