2.0.3 • Published 4 years ago

react-simple-paginator v2.0.3

Weekly downloads
35
License
MIT
Repository
github
Last release
4 years ago

install

npm install react-simple-paginator

easy to use

import React from 'react';
import Paginator from 'react-simple-paginator';

export const Basic = () => {
  const totalPage = 10;
  const [currentPage, setCurrentPage] = useState(1);
  useEffect(()=>{
    // fetch data and update your page data source here
  },[currentPage])
  return (
    <>
      <h2>show content for page {currentPage}</h2>
      <Paginator
        totalPageNumber={totalPage}
        currentPageNumber={currentPage}
        onPageNavigation={(page) => () => {
          setCurrentPage(page);
        }}
      />
    </>
  );
};

see this

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.1.1

4 years ago

1.1.2

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago