React timer hook
totalSeconds
property… by @kilokeith in https://github.com/amrlabib/react-timer-hook/pull/98
Full Changelog: https://github.com/amrlabib/react-timer-hook/compare/v3.0.6...v3.0.7
useStopwatch
for browser tab inactive behaviour of setTimeout
and setInterval
Update peerDependencies range in package.json
useTimer
autoStart
to be true if not passed in settingsrestart
and reset
functions changesautoStart
to true in restart
and reset
functionsuseInterval
hook to handle interval reference and correct callback function with updated state and propsuseTimer
, useStopwatch
and useTime
implementation to use useInterval
for cleaner codeuseTimer
in different way, instead of decrementing current seconds it will calculate the expiry timestamp and then work by calculating timestamp every second, this way it is more accurateautoStart
settings in useTimer
autoStart
parameter in restart
function in useTimer
offsetTimestamp
in useStopwatch
to fix #42onExpire
incorrect time when the timer is less than 1 second