"use client";
import { useState as c, useEffect as r } from "react";
function i(e, t) {
  const [u, o] = c(e);
  return r(() => {
    const n = setTimeout(() => {
      o(e);
    }, t);
    return () => {
      clearTimeout(n);
    };
  }, [e, t]), u;
}
export {
  i as useDebounce
};
