UNPKG
ht_hooks
Version:
latest (0.1.1)
0.1.1
0.1.0
ht React 业务 Hooks
github.com/MengToong/ht_hooks
MengToong/ht_hooks
ht_hooks
/
lib
/
usePrevious
/
index.d.ts
4 lines
(3 loc)
•
199 B
TypeScript
View Raw
1
2
3
4
export
type
ShouldUpdateFunc
<T> =
(
prev
: T |
undefined
,
next
: T
) =>
boolean
;
declare
function
usePrevious<T>(
state
: T,
shouldUpdate
?:
ShouldUpdateFunc
<T>): T |
undefined
;
export
default
usePrevious;