Gathering detailed insights and metrics for reactjs-countdown-hook
Gathering detailed insights and metrics for reactjs-countdown-hook
Gathering detailed insights and metrics for reactjs-countdown-hook
Gathering detailed insights and metrics for reactjs-countdown-hook
npm install reactjs-countdown-hook
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (88.72%)
HTML (9.81%)
CSS (1.47%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
4 Stars
8 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Feb 16, 2025
Latest Version
1.0.5
Package Id
reactjs-countdown-hook@1.0.5
Unpacked Size
675.21 kB
Size
185.29 kB
File Count
22
NPM Version
6.14.13
Node Version
14.17.3
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
1
41
a simple count down timer hook for react
Full Tutorial In My Blog: click here reactjs-countdown-hook is a simple count down timer hook for react that makes creating timers very easy this hook is very flexible and it accepts seconds and a function to run after the count down is over and it features formatted seconds, minutes, hours and days and it has functions for pausing, resuming and resetting.
1 2npm install --save reactjs-countdown-hook 3
the useTimer hook of "reactjs-countdown-hook" accepts initial remaining time as seconds and an optional callback function to run when the timer is over and the hook returns the following variables:
in the below example I have created a simple timer with 2 minutes initial remaining time and it alerts "times up!" when the count down is over:
1 2import { useTimer } from "reactjs-countdown-hook"; 3 4const Example = () => { 5 6const { 7isActive, 8counter, 9seconds, 10minutes, 11hours, 12days, 13pause, 14resume, 15reset, 16} = useTimer(120, handleTimerFinish); 17 18function handleTimerFinish() { 19 alert("times up!"); 20} 21 22return ( 23<div> 24 25 <div>{`${days} : ${hours} : ${minutes} : ${seconds}`}</div> 26 <button onClick={() => (isActive ? pause() : resume())}> 27 {isActive ? "Pause" : "Resume"} 28 </button> 29 <button onClick={reset}>Reset</button> 30 31</div> 32 33); 34 35}; 36
MIT © hoseinhamzei
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 0/8 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
76 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