pagination controlled component for ease of use for react-bootstrap applications
npm install --save react-bootstrap-controlled-pagination
import React, { useState } from 'react'
// import 'bootstrap/dist/css/bootstrap.min.css'; added bootstrap as script tag in public/index.html
import styles from './App.module.css';
import { Pagination } from 'react-bootstrap-controlled-pagination'
const App = () => {
const [number, setNumber] = useState(0);
return <div className={styles.container}>
<div className={styles.number}>{number}</div>
<Pagination value={number} start={0} end={324} onSelect={setNumber}/>
</div>
}
export default App;
MIT © adir1661