react-human-timer
React component wrapper for human-timer: tiny, human readable timer with no external dependencies. Specify the duration in seconds, add callbacks to timer ticks and end, stop it at any moment.
Here's the main human-timer library
Installation:
npm install --save react-human-timer
Test
npm run test
Usage:
<HumanTimer onTick= console onEnd= console active=true // set to false to pause the timer, default is true zeroes=false // won't turn 5 mins into 05 mins, default is true seconds=7200 // 2 hour long duration> <div> <p>Hours: timerhours</p> <p>Minutes: timerminutes</p> <p>Seconds: timerseconds</p> </div> </HumanTimer>
Is there something wrong?
Please tell me!