);
}
}
render(, document.getElementById('root'));
```
## Examples
* [with simple basic data](https://github.com/ChoTotOSS/react-paginating/tree/master/examples/withBasic)
* [with redux & query param from url](https://github.com/ChoTotOSS/react-paginating/tree/master/examples/withNextJSRedux)
## Input Props
### total
> `number`
Total results
### limit
> `number`
Number of results per page
### pageCount
> `number`
How many pages number you want to display in pagination zone.
### currentPage
> `number`
Current page number
## Child callback functions
### getPageItemProps
> `function({ pageValue: number, onPageChange: func })`
Allow to pass props and event to page item. When page is clicked, `onPageChange`
will be executed with param value `pageValue`.
**Note:** This callback function should only use for paging with state change.
If you prefer parsing page value from `query` url (**Please don't use this
callback function**).
## Controlled Props
### pages
> `array: [number]`
List of pages number will be displayed. E.g: [1, 2, 3, 4, 5]
### currentPage
> `number`
### previousPage
> `number`
### nextPage
> `number`
### totalPages
> `number`
### hasNextPage
> `boolean`
Check if it has `next page` or not.
### hasPreviousPage
> `boolean`
Check if it has `previous page` or not.
## Alternatives
If you don’t agree with the choices made in this project, you might want to
explore alternatives with different tradeoffs. Some of the more popular and
actively maintained ones are:
* [react-paginate](https://github.com/AdeleD/react-paginate)