Deprecated
new useCountdown interface is already available (see Documentation), the old version will retire on usehooks-ts@3.
import { useCountdown } from "https://deno.land/x/netzo@0.5.63/deps/usehooks-ts.ts";
A hook to manage countdown - Legacy interface
Examples
const [counter, { start, stop, reset }] = useCountdown({
seconds: 10,
interval: 1000,
isIncrement: false,
});
const [counter, { start, stop, reset }] = useCountdown({ seconds: 10, interval: 1000, isIncrement: false, });