UNPKG

rooks

Version:

Collection of awesome react hooks

10 lines (9 loc) 334 B
type CallbackType<T, R> = (...args: T[]) => R; /** * useFreshCallback * @param callback Any callback function * @returns A fresh callback. * @see https://rooks.vercel.app/docs/hooks/useFreshCallback */ declare function useFreshCallback<T, R = void>(callback: CallbackType<T, R>): CallbackType<T, R>; export { useFreshCallback };