This library provides hooks to efficiently manage timer and other related time logic throughout your applications.
npm install --save time-hooks
import { useTimer } from 'time-hooks';
// ...
const [timer, start, stop, clear] = useTimer(1000);
// ...
import { useCountdownTimer } from 'time-hooks';
// ...
const [countdown, start, stop, clear, add] = useCountdownTimer(15 * 60 * 1000, 1000);
// ...
MIT © nubinub