React JS and Laravel Pagination

Install library 

react-js-pagination

Use axios api

axios.get(`http://127.0.0.1:8000/users?page=${pageNumber}`)

Use Pagination component

<Pagination
                activePage={pagination.currentPage}
                totalItemsCount={pagination.total}
                itemsCountPerPage={pagination.perPage}   
                onChange={(pageNumber)=>getUserData(pageNumber)}  
                itemClass="page-item"
                linkClass="page-link"
                firstPageText="First"
                lastPageText="Last"
                />
© 2016 - 2022, All Rights are Reserved.