Skip to content

v3.0.0

Compare
Choose a tag to compare
@amrlabib amrlabib released this 17 Apr 13:45
· 69 commits to master since this release
  • 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