@gingerhendrix/use-interval-timer
v1.0.0
Published
React hook for interval based timer
Downloads
34
Readme
@gingerhendrix/use-interval-timer
React hook for interval based timer
Install
npm install --save @gingerhendrix/use-interval-timer
Usage
import * as React from 'react'
import useIntervalTimer from '@gingerhendrix/use-interval-timer'
const Example = () => {
const {tick} = useIntervalTimer({interval: 100, maxTicks: 200})
return (
<div>
{tick}
</div>
)
}
License
MIT © gingerhendrix
This hook is created using create-react-hook.