UNPKG

@mantine/hooks

Version:

A collection of 50+ hooks for state and UI management

12 lines (11 loc) 380 B
interface UseIntervalOptions { /** If set, the interval will start automatically when the component is mounted, `false` by default */ autoInvoke?: boolean; } export declare function useInterval(fn: () => void, interval: number, { autoInvoke }?: UseIntervalOptions): { start: () => void; stop: () => void; toggle: () => void; active: boolean; }; export {};