react-paginators
Basic paginator component for React. This component is designed to be used with the header links.
DEMO
Usage
create-react-app react-paginators-example && cd $_
npm install --save axios parse-link-header react-paginators
create src/Posts.js
const BASE_URL = "https://jsonplaceholder.typicode.com" { return axios} { } { } { const posts = thisstate && thisstateposts || const current = thisstate && thisstatecurrent || 1 const last = thisstate && || 1 return <div> <div style=display: "flex" justifyContent: "center" > <Bootstrap3ishPaginator current=current last=last maxPageCount=10 onClick=thishandleClick /> </div> <ul style=listStyleType:"none"> posts </ul> </div> }
edit src/App.js
;+ {@@ -136 +147 @@ <p className="App-intro"> To get started edit <code>src/Appjs</code> and save to reload </p>+ <Posts /> </div> );
And run it
npm start