@orca-fe/hooks
Version:
React Hooks Collections
12 lines (11 loc) • 342 B
TypeScript
export type UseAnimationFrameOptions = {
/** 手动触发 */
manual?: boolean;
};
declare const useAnimationFrame: (callback?: (ms: number, stepMs: number) => void, options?: UseAnimationFrameOptions) => {
start: () => void;
stop: () => void;
toggle: () => void;
running: boolean;
};
export default useAnimationFrame;