UNPKG
@lyonph/preact-hooks
Version:
latest (0.7.0)
0.7.0
0.6.0
0.5.1
0.5.0
0.4.0
0.3.0
0.2.0
0.1.3
0.1.2
0.1.1
0.1.0
Collection of useful Preact Hooks
github.com/LyonInc/preact-hooks
@lyonph/preact-hooks
/
dist
/
types
/
useDependencyChanged.d.ts
4 lines
(3 loc)
•
235 B
TypeScript
View Raw
1
2
3
4
export
declare
function
defaultCompare<R>(
a
: R,
b
: R):
boolean
;
export
declare
type
ShouldUpdate
<R> =
(
a
: R,
b
: R
) =>
boolean
;
export
default
function
useDependencyChanged<R>(
dependency
: R,
shouldUpdate
?:
ShouldUpdate
<R>):
boolean
;