react-timing-hooks
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -5,2 +5,6 @@ # Changelog | ||
### [0.1.1](https://github.com/EricLambrecht/react-timing-hooks/compare/v0.1.0...v0.1.1) (2019-11-08) | ||
This release contains only documentation updates. | ||
## [0.1.0](https://github.com/EricLambrecht/react-timing-hooks/compare/v0.1.0-alpha.6...v0.1.0) (2019-11-08) | ||
@@ -7,0 +11,0 @@ |
{ | ||
"name": "react-timing-hooks", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "React hooks for creating timing-related effects (setTimeout, setInterval, requestAnimationFrame, requestIdleCallback)", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
# react-timing-hooks | ||
This library contains (or will contain) a bunch of hooks that can be used to trigger effects | ||
containing timeouts, intervals etc. without having to worry about storing "timeoutIds" or proper | ||
clean up of leaking timers. Apart from that this lib is super light-weight, since it doesn't include | ||
any other dependencies. | ||
This package contains a bunch of hooks that allow you to make use of `setTimeout`, | ||
`setInterval`, `setIdleCallback` and `requestAnimationFrame` in your react-components _without_ | ||
having to worry about handling "IDs" or the clean up of leaking timers etc. Apart from that | ||
the hooks are quite easy to use. | ||
**This package is still in alpha. It is not yet feature complete.** | ||
Oh, and the lib is super light-weight, too, since it doesn't include any other dependencies! | ||
@@ -29,4 +29,2 @@ #### TL;DR | ||
**Note**: A hook for `requestAnimationFrame` and an interval-versions of `requestIdleCallback` is still in development | ||
### `useTimeout(callback, timeout)` | ||
@@ -54,2 +52,5 @@ | ||
This works like a regular `useEffect` hook, except that it adds a `setTimeout` like function | ||
to the callback args. | ||
Example: | ||
@@ -122,2 +123,5 @@ | ||
This works like a regular `useEffect` hook, except that it adds a `requestIdleCallbackEffect` like function | ||
to the callback args. | ||
**Note:** This hook will print a warning if the browser doesn't support `requestIdleCallback`. | ||
@@ -124,0 +128,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37363
184