Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. ๐ซ Status page with uptime monitoring & API monitoring as code ๐ซ openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor
Something went wrong. Try again.
447 B ยท 18 lines
TypeScript
12345678910111213141516171819"use client";
import * as React from "react";
// consider using https://github.com/xnimorz/use-debounceexport function useDebounce<T>(value: T, delay?: number): T { const [debouncedValue, setDebouncedValue] = React.useState<T>(value);
React.useEffect(() => { const timer = setTimeout(() => setDebouncedValue(value), delay ?? 500);
return () => { clearTimeout(timer); }; }, [value, delay]);
return debouncedValue;}