UNPKG
common-hook
Version:
latest (1.3.2)
1.3.2
1.2.0
1.1.0
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
0.0.3
0.0.2
0.0.1
提供项目中常用的 React Hooks
github.com/JainaXiong/common-hook
JainaXiong/common-hook
common-hook
/
es
/
state
/
useThrottle.d.ts
9 lines
(8 loc)
•
308 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
9
/** *
@name
处理节流值Hook *
@description
* 规定在时间内,只能触发一次函数。如果这个时间内触发多次函数,只有一次生效 *
@example
* const throttledValue = useThrottle(value, { wait: 500 }) */
export
declare
const
useThrottle
: <T>
(
value
: T,
options
?:
any
) =>
any
;