@loke/design-system
Version:
A design system with individually importable components
9 lines (8 loc) • 365 B
TypeScript
/**
* A hook that determines if the current viewport is considered mobile based on width
*
* This hook uses the MediaQueryList API to monitor viewport size changes and
* classifies the device as mobile when the viewport width is below 768px.
* It updates state whenever the viewport crosses this breakpoint.
*/
export declare function useIsMobile(): boolean;