UNPKG

@lyonph/preact-hooks

Version:

Collection of useful Preact Hooks

6 lines (5 loc) 218 B
/** * 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;