@atlaskit/motion
Version:
A set of utilities to apply motion in your application.
13 lines (12 loc) • 474 B
TypeScript
interface Opts {
cleanup: 'next-effect' | 'unmount';
}
/**
* Will return request animation frame as a function which will clean itself up.
*/
export declare const useRequestAnimationFrame: (opts?: Opts) => ((handler: FrameRequestCallback) => void);
/**
* Will return set timeout as a function which will clean itself up.
*/
export declare const useSetTimeout: (opts?: Opts) => ((handler: Function, timeout?: number | undefined, ...args: any[]) => void);
export {};