Gathering detailed insights and metrics for react-hooks-paginator-fixed
Gathering detailed insights and metrics for react-hooks-paginator-fixed
Gathering detailed insights and metrics for react-hooks-paginator-fixed
Gathering detailed insights and metrics for react-hooks-paginator-fixed
npm install react-hooks-paginator-fixed
Typescript
Module System
Node Version
NPM Version
HTML (90.54%)
JavaScript (8.7%)
SCSS (0.69%)
Shell (0.07%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
19 Stars
102 Commits
8 Forks
2 Watchers
13 Branches
2 Contributors
Updated on Jul 07, 2025
Latest Version
0.5.4
Package Id
react-hooks-paginator-fixed@0.5.4
Unpacked Size
7.81 kB
Size
2.78 kB
File Count
4
NPM Version
10.9.0
Node Version
22.14.0
Published on
May 02, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
28
A library for adding simple paginator functionality to your react app.
Requires react >= 16.8.0
Run the following command:
npm install react-hooks-paginator
1import React, { useState } from 'react'; 2import ReactDOM from 'react-dom'; 3import Paginator from 'react-hooks-paginator'; 4 5function App() { 6 const [offset, setOffset] = useState(0); 7 const [currentPage, setCurrentPage] = useState(1); 8 9 const data = [page1, page2, page3, page4, page5, page6]; 10 11 return ( 12 <div> 13 <Paginator 14 totalRecords={data.length} 15 pageLimit={4} 16 pageNeighbours={1} 17 setOffset={setOffset} 18 currentPage={currentPage} 19 setCurrentPage={setCurrentPage} 20 /> 21 </div> 22 ); 23} 24 25export default App;
Property | Type | Default | Description |
---|---|---|---|
totalRecords | Number (required) | The length of the data we are tabulating | |
pageLimit | Number (required) | Minimum number of records per page | |
pageNeighbours | Number (required) | Number of page blocks by the left and right of the middle page | |
setOffset | function (required) | function that updates the offset state | |
setCurrentPage | function (required) | function that updates the current page state | |
currentPage | Number (required) | The current page state | |
pageContainerClass | String | react-hooks-paginator | Paginator container classname |
pageActiveClass | String | active | Active page item classname |
pageItemClass | String | page-item | Page item classname |
pageLinkClass | String | page-link | Page link classname |
pagePrevText | String or Node | Next » | Prev page item text |
pageNextText | String or Node | « Prev | Next page item text |
pagePrevClass | String | page-link | Prev page custom class |
pageNextClass | String | next-link | Next page custom class |
1import React, { useState, useEffect } from 'react'; 2import ReactDOM from 'react-dom'; 3import Paginator from 'react-hooks-paginator'; 4import { fetchData } from './data-fetcher'; 5 6function App() { 7 const pageLimit = 10; 8 9 const [offset, setOffset] = useState(0); 10 const [currentPage, setCurrentPage] = useState(1); 11 const [data, setData] = useState([]); 12 const [currentData, setCurrentData] = useState([]); 13 14 useEffect(() => { 15 fetchData().then(data => setData(data)); 16 }, []); 17 18 useEffect(() => { 19 setCurrentData(data.slice(offset, offset + pageLimit)); 20 }, [offset, data]); 21 22 return ( 23 <div> 24 <ul> 25 {currentData.map(data => ( 26 <li>{data}</li> 27 ))} 28 </ul> 29 <Paginator 30 totalRecords={data.length} 31 pageLimit={pageLimit} 32 pageNeighbours={2} 33 setOffset={setOffset} 34 currentPage={currentPage} 35 setCurrentPage={setCurrentPage} 36 /> 37 </div> 38 ); 39} 40 41export default App;
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
5 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 4
Reason
Found 0/11 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
18 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More