Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-timing-hooks

Package Overview
Dependencies
Maintainers
0
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-timing-hooks - npm Package Versions

2345

5.1.0

Diff

Changelog

Source

5.1.0 (2024-09-20)

Features

  • Add useOscillator() hook - Toggles a boolean on and off repeatedly (0b80200)
  • New option isLeading for the useInterval() hook (98a95db), closes #39
eric.lambrecht
published 5.0.2 •

Changelog

Source

5.0.2 (2024-09-20)

Bug Fixes

eric.lambrecht
published 5.0.1 •

Changelog

Source

5.0.1 (2024-08-03)

Bug Fixes

  • Fix npm package description (39aaffb)
eric.lambrecht
published 5.0.0 •

Changelog

Source

5.0.0 (2024-08-02)

⚠ BREAKING CHANGES

  • Paused clocks will now keep running in the background by default
  • Counters will now reset on stop by default.

Features

  • Add reset function to counters, and option to reset on stop (b1c8ee9)
  • Add useThrottledState() hook to tame rapid firing state updates (f56261a), closes #35
  • Allow clock to keep running in background during pause (to resume at the right time) (8021bcd)

Bug Fixes

  • Fix some vulnerabilities using npm audit fix (1be9a7a)
  • Fix timers not resetting on stop (f19ef08), closes #36
eric.lambrecht
published 4.0.2 •

Changelog

Source

5.0.0 (2024-08-02)

⚠ BREAKING CHANGES

  • Paused clocks will now keep running in the background by default
  • Counters will now reset on stop by default.

Features

  • Add reset function to counters, and option to reset on stop (b1c8ee9)
  • Add useThrottledState() hook to tame rapid firing state updates (f56261a), closes #35
  • Allow clock to keep running in background during pause (to resume at the right time) (8021bcd)

Bug Fixes

  • Fix some vulnerabilities using npm audit fix (1be9a7a)
  • Fix timers not resetting on stop (f19ef08), closes #36
eric.lambrecht
published 4.0.1 •

Changelog

Source

4.0.1 (2022-12-18)

Bug Fixes

  • Add missing export for useThrottle() (609bc76)
eric.lambrecht
published 4.0.0 •

Changelog

Source

4.0.0 (2022-12-18)

⚠ BREAKING CHANGES

  • timeout: useTimeout() will not implicitly debounce its callbacks anymore. A new hook useDebounce() was added to explicitly use this feature properly.
  • countdown: useCountdown() will now have a mandatory end param and will automatically stop and fire an event when this value is reached.
  • clock: The return value of useClock() is now an array: [time, controls] (controls being pause/resume, start/stop etc.).
  • timer: The return value of useTimer() is now an array: [timerValue, controls] (controls being pause/resume, start/stop etc.)
  • interval: Intervals won't start immediately on mount anymore. They will have to be started manually or explicitly be allowed to start on mount via options.startOnMount. This change affects useInterval, useCounter, useTimer and useCountdown.
  • animation-frame: The second argument (pause/stop) was removed from useAnimationFrameLoop() in favor of controls like they are used in useInterval(), useCounter() etc. By default, the hook also won't start to loop on mount anymore (though this is still available as an option).

Features

  • animation-frame: useAFL can now be controlled like useInterval(), also fixed unnecessary re-renders (24789a9), closes #33
  • clock: Add ability to "stop the clock". (1c10837)
  • countdown: Add end to useCountdown() and an event to listen to (2e5b6c9)
  • debounce: Add new hook useDebounce() (15aca52)
  • interval: Add option to start interval on mount (d791a94), closes #32
  • throttle: Add new hook useThrottle() for rate-limiting (224c15b)
  • timer: Add ability to control timer state (pause etc.) (b4ab3be), closes #34
eric.lambrecht
published 3.2.2 •

Changelog

Source

4.0.0 (2022-12-18)

⚠ BREAKING CHANGES

  • timeout: useTimeout() will not implicitly debounce its callbacks anymore. A new hook useDebounce() was added to explicitly use this feature properly.
  • countdown: useCountdown() will now have a mandatory end param and will automatically stop and fire an event when this value is reached.
  • clock: The return value of useClock() is now an array: [time, controls] (controls being pause/resume, start/stop etc.).
  • timer: The return value of useTimer() is now an array: [timerValue, controls] (controls being pause/resume, start/stop etc.)
  • interval: Intervals won't start immediately on mount anymore. They will have to be started manually or explicitly be allowed to start on mount via options.startOnMount. This change affects useInterval, useCounter, useTimer and useCountdown.
  • animation-frame: The second argument (pause/stop) was removed from useAnimationFrameLoop() in favor of controls like they are used in useInterval(), useCounter() etc. By default, the hook also won't start to loop on mount anymore (though this is still available as an option).

Features

  • animation-frame: useAFL can now be controlled like useInterval(), also fixed unnecessary re-renders (24789a9), closes #33
  • clock: Add ability to "stop the clock". (1c10837)
  • countdown: Add end to useCountdown() and an event to listen to (2e5b6c9)
  • debounce: Add new hook useDebounce() (15aca52)
  • interval: Add option to start interval on mount (d791a94), closes #32
  • throttle: Add new hook useThrottle() for rate-limiting (224c15b)
  • timer: Add ability to control timer state (pause etc.) (b4ab3be), closes #34
eric.lambrecht
published 3.2.1 •

Changelog

Source

3.2.1 (2022-12-14)

Bug Fixes

  • Add missing exports for useCounter and useCountdown (5e4b3c0)
eric.lambrecht
published 3.2.0 •

Changelog

Source

3.2.0 (2022-12-14)

Features

  • countdown: Add new countdown hook. (fc4283b)
  • counter: Add counter hook. A more customizable version of useTimer(). (77ccea5)
  • interval: Allow pausing, resuming, stopping of intervals (a0e0c3f)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc