Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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.66/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.