Skip to content

Releases: amrlabib/react-timer-hook

v3.0.2

19 Apr 19:59
Compare
Choose a tag to compare
  • Change default of useTimer autoStart to be true if not passed in settings

v3.0.1

17 Apr 15:15
Compare
Choose a tag to compare
  • update typescript definition file with restart and reset functions changes
  • put back expiry timestamp validation in useTimer
  • set default autoStart to true in restart and reset functions

v3.0.0

17 Apr 13:45
Compare
Choose a tag to compare
  • Create useInterval hook to handle interval reference and correct callback function with updated state and props
  • Change useTimer, useStopwatch and useTime implementation to use useInterval for cleaner code
  • Handle resume in useTimer 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 accurate
  • Support autoStart settings in useTimer
  • Support autoStart parameter in restart function in useTimer

v2.0.7

24 Dec 18:39
Compare
Choose a tag to compare
  • add support to offsetTimestamp in useStopwatch to fix #42

v2.0.6

05 Dec 16:44
Compare
Choose a tag to compare

v2.0.5

30 Nov 18:21
Compare
Choose a tag to compare
  • Fix calling onExpire incorrect time when the timer is less than 1 second

v2.0.4

30 Nov 18:19
Compare
Choose a tag to compare
  • Fix react-dom peer dependency version requirement: issue #39
  • Fix Ability to run the timer in smaller intervals (500ms): issue #35

v2.0.3

04 Sep 13:37
Compare
Choose a tag to compare
  • Fix for SSR: issue #29

v2.0.2

09 Apr 09:51
Compare
Choose a tag to compare

Add isRunning flag in typescript definition file

v2.0.1

09 Apr 09:41
Compare
Choose a tag to compare
  1. Add isRunning state to useTimer
  2. Add isRunning state to useStopwatch