Files
NapCatQQ/.pnpm-store/v3/files/05/e29e61937d9506ebfeb439a5f7845c060c2e5ae11131bc9eb08644c431b36d5486d5429f2ee31810ccdff442a8e07e1cbd29212befd66d83765742ec9613b2
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

15 lines
448 B
Plaintext

import { __read } from "tslib";
import { useEffect, useState } from 'react';
import useThrottleFn from '../useThrottleFn';
function useThrottle(value, options) {
var _a = __read(useState(value), 2), throttled = _a[0], setThrottled = _a[1];
var run = useThrottleFn(function () {
setThrottled(value);
}, options).run;
useEffect(function () {
run();
}, [value]);
return throttled;
}
export default useThrottle;