UNPKG

@supunlakmal/hooks

Version:

A collection of reusable React hooks

10 lines (9 loc) 451 B
/** * A hook that tracks whether a media query matches, but debounces the result. * Useful to avoid rapid state changes during events like window resizing. * * @param query The media query string (e.g., '(min-width: 768px)'). * @param delay The debounce delay in milliseconds. * @returns A boolean indicating whether the media query matches (debounced). */ export declare function useDebouncedMediaQuery(query: string, delay: number): boolean;