UNPKG

@lesnoypudge/utils-react

Version:

lesnoypudge's utils-react

12 lines (11 loc) 395 B
export declare namespace useAnimationFrame { type Return = { start: VoidFunction; stop: VoidFunction; }; } /** * Starts and stops an animation frame loop with a provided callback. * The callback is invoked on each animation frame while enabled. */ export declare const useAnimationFrame: (callback: FrameRequestCallback, enabled: boolean) => useAnimationFrame.Return;