0.0.2 • Published 5 years ago

react-timer-hooks v0.0.2

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

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 {
      ...
  }
};
0.0.2

5 years ago

0.0.1

5 years ago