@itprogerru/use-timer
v1.0.3
Published
```yarn add @itprogerru/use-timer```
Downloads
16
Readme
Простой таймер обратного отчета
установка
yarn add @itprogerru/use-timer
использование
const { countdown, disable, onStart } = useTimer(60);
useEffect(()=>{
onStart();
},[onStart])
return (<>
{disable ? countdown : <button onCLick={()=>onStart()}>звпустить заново</button>}
</>)
####useTimer(60); // количество секунда
####countdown - секунды
####disable - флаг tru если таймер запущен
####onStart - функция запуска