final-countdown-js icon indicating copy to clipboard operation
final-countdown-js copied to clipboard

Run a function when the counter, stopwatch or timer is played

Open dlcastillop opened this issue 2 years ago • 2 comments

dlcastillop avatar Mar 06 '24 23:03 dlcastillop

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"),
});

dlcastillop avatar Mar 06 '24 23:03 dlcastillop

Hey @dlcastillop, can i work on this issue ?

Ujjwal-here avatar Aug 25 '25 09:08 Ujjwal-here