UNPKG

@hanamura/react-containers

Version:
18 lines (17 loc) 679 B
import { Queries } from './types'; /** * Hook for responsive media queries that supports Suspense boundary * * This hook will: * - Suspend rendering on the server (allowing fallback content) * - Handle media query matching on the client * - Continue to track window resize/changes for responsive behavior * * @param queries - Array of media query definitions with associated keys * @returns Object containing active context key and initialization state * * @typeParam K - Type for breakpoint keys (e.g. 'mobile', 'tablet', 'desktop') */ export declare function useAdaptiveMediaQuery<K extends string = string>(queries?: Queries<K>): { activeContext: K | null; };