UNPKG
ahooks-v2
Version:
latest (2.10.15)
2.10.15
2.10.13
react hooks library
github.com/alibaba/hooks
alibaba/hooks
ahooks-v2
/
lib
/
usePrevious
/
index.d.ts
4 lines
(3 loc)
•
200 B
TypeScript
View Raw
1
2
3
4
export
declare
type
compareFunction<T> =
(
prev
: T |
undefined
,
next
: T
) =>
boolean
;
declare
function
usePrevious<T>(
state
: T,
compare
?: compareFunction<T>): T |
undefined
;
export
default
usePrevious;