0.0.2 • Published 5 years ago
react-timer-hooks v0.0.2
react-timer-hooks
Usage
import { useTimeout, useInterval } from "react-timer-hooks";
const TestTimeout = () => {
// instead of setTimeout()
useTimeout(() => {
console.log("test timeout");
}, 1000);
return {
...
}
};
const TestInterval = () => {
// instead of setInterval()
useInterval(() => {
console.log("test interval");
}, 1000);
return {
...
}
};