@geniussoft/use-hooks
Advanced tools
Comparing version 0.0.3 to 0.0.7
{ | ||
"name": "@geniussoft/use-hooks", | ||
"version": "0.0.3", | ||
"version": "0.0.7", | ||
"description": "Reusable React Hooks from useHooks.com and other online resources", | ||
@@ -12,4 +12,7 @@ "keywords": [ | ||
], | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"files": [ | ||
"./lib" | ||
], | ||
"repository": "https://github.com/geniussoftlk/use-hooks.git", | ||
@@ -16,0 +19,0 @@ "author": "Chathu Vishwajith <iam@chathu.me>", |
@@ -76,2 +76,18 @@ # useHooks | ||
## useInterval | ||
Source from [Dan Dan Abramov's blog post](https://overreacted.io/making-setinterval-declarative-with-react-hooks/) | ||
Importing module to your project | ||
```es6 | ||
import { useInterval } from '@geniussoft/use-hooks'; | ||
``` | ||
```es6 | ||
useInterval(() => { | ||
setTime(dateTime); | ||
}, 1000); | ||
``` | ||
--- | ||
@@ -78,0 +94,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
7759
11
94
97