useThrottle
防抖函数,lodash throttle 二次封装
安装
npm
pnpm
yarn
npm install @jelper/hooks
引入
import { useThrottle } from '@jelper/hooks';
样例
基础用法
count: 0
基础用法
API
useThrottle
参数 | 说明 | 类型 | 默认值 | 版本 |
---|---|---|---|---|
useThrottle | 基于lodash throttle 节流函数 | <T extends (...args: any) => any>(cb: T, wait?: number, opts?: ThrottleSettings) => DebouncedFunc<T> | -- |