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
/
useConditionalCallback.d.ts
5 lines
(4 loc)
•
259 B
TypeScript
View Raw
1
2
3
4
5
import
{
ShouldUpdate
}
from
'./useDependencyChanged'
;
declare
type
AnyCallback
=
(
...
args
:
any
[]
) =>
any
;
export
default
function
useConditionalCallback<T
extends
AnyCallback
, R>(
supplier
: T,
dependency
: R,
shouldUpdate
?:
ShouldUpdate
<R>): T;
export
{};