Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/netzo/deps/usehooks-ts.ts>useCountdown

Full-stack Deno framework for building business web apps like internal tools, dashboards, admin panels and automated workflows.
Go to Latest
function useCountdown
Deprecated
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, });

Parameters

countdownOptions: LegacyCountdownOptions

the countdown's options.

Returns

[number, LegacyCountdownControllers]

An array containing the countdown's count and its controllers.