Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ebazhanov/pagination-react

Pagination simple example
https://github.com/ebazhanov/pagination-react

demo pagination reactjs

Last synced: about 1 month ago
JSON representation

Pagination simple example

Awesome Lists containing this project

README

        

### Pagination with [tutorial](https://www.youtube.com/watch?v=IYCa1F-OWmk)

This repo about simple example of pagination

```javascript
const Pagination = ({postsPerPage, totalPosts, paginate}) => {
const pageNumbers = [];

for (let i = 1; i <= Math.ceil(totalPosts / postsPerPage); i++) {
pageNumbers.push(i);
}

return (



);
};
export default Pagination;
```

Demo
----

```console
$ yarn start
```

Open your browser and go to [http://localhost:3000/](http://localhost:3000/)

or here [https://pagination-basic.netlify.com/](https://pagination-basic.netlify.com/)

![Pagination Demo](Pagination.gif)