rooks
Version:
Collection of awesome react hooks
11 lines (10 loc) • 386 B
TypeScript
/**
*
* useRaf
* Uses a polyfilled version of requestAnimationFrame
*
* @param {Function} callback The callback function to be executed
* @param {boolean} [isActive] The value which while true, keeps the raf running infinitely
* @see https://rooks.vercel.app/docs/hooks/useRaf
*/
export declare function useRaf(callback: (timeElapsed: number) => void, isActive: boolean): void;