react-timer-hook
Advanced tools
Comparing version
@@ -10,5 +10,7 @@ import { useState, useEffect, useRef } from 'react'; | ||
if(settings.expiryTimestamp) { | ||
return useTimer(settings); | ||
const values = useTimer(settings); | ||
return { ...values, startTimer: values.start, stopTimer: values.pause, resetTimer: () => {} }; | ||
} else { | ||
return useStopwatch(settings); | ||
const values = useStopwatch(settings); | ||
return { ...values, startTimer: values.start, stopTimer: values.pause, resetTimer: values.reset }; | ||
} | ||
@@ -15,0 +17,0 @@ } |
{ | ||
"name": "react-timer-hook", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "React timer hook is a custom react hook built to handle timers and count down logic in your react component.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
171216
0.13%163
1.24%