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
/
useConstantCallback.d.ts
6 lines
(5 loc)
•
218 B
TypeScript
View Raw
1
2
3
4
5
6
/** * Creates a component-level constant function reference *
@param
cb a function reference that will be memoized */
export
default
function
useConstantCallback<T
extends
(
(
...
args
:
any
[]
) =>
any
)>(
cb
: T): T;