use-mobile-detect-hook
Version:
The React hook to detect if the device is mobile or desktop.
16 lines (15 loc) • 413 B
TypeScript
declare const useEffect: any;
declare const getMobileDetect: (userAgent: string) => {
isMobile: () => boolean;
isDesktop: () => boolean;
isAndroid: () => boolean;
isIos: () => boolean;
isSSR: () => boolean;
};
declare const useMobileDetect: () => {
isMobile: () => boolean;
isDesktop: () => boolean;
isAndroid: () => boolean;
isIos: () => boolean;
isSSR: () => boolean;
};