Run a function when the counter, stopwatch or timer is played
Opened this issue · 1 comments
dlcastillop commented
Run a function when the counter, stopwatch or timer is played
dlcastillop commented
Examples
const counter = useCountDown(0, 10, {
startPaused: false,
onFinish: () => console.log("Counter ended"),
onPlay: () => console.log("Counter paused"),
});
const counter = useCountUp(0, 10, {
startPaused: false,
onFinish: () => console.log("Counter ended"),
onPlay: () => console.log("Counter paused"),
});
const counter = useStopwatch({
endTime: "00:00:00:10",
startPaused: false,
onFinish: () => console.log("Counter ended"),
onPlay: () => console.log("Stopwatch paused"),
});
const counter = useTimer("00:00:00:10", {
startPaused: false,
onFinish: () => console.log("Counter ended"),
onPlay: () => console.log("Timer paused"),
});