0.1.2 • Published 5 years ago

time-hooks v0.1.2

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

time-hooks

This library provides hooks to efficiently manage timer and other related time logic throughout your applications.

NPM JavaScript Style Guide

Install

npm install --save time-hooks

Usage

useTimer

import { useTimer } from 'time-hooks';

// ...
const [timer, start, stop, clear] = useTimer(1000);
// ...

useCountdownTimer

import { useCountdownTimer } from 'time-hooks';

// ...
const [countdown, start, stop, clear, add] = useCountdownTimer(15 * 60 * 1000, 1000);
// ...

License

MIT © nubinub