UNPKG

@react-hookz/web

Version:

React hooks done right, for browser and SSR.

9 lines (8 loc) 369 B
export declare type ScreenOrientation = 'portrait' | 'landscape'; /** * Checks if screen is in `portrait` or `landscape` orientation. * * As `Screen Orientation API` is still experimental and not supported by Safari, this * hook uses CSS3 `orientation` media-query to check screen orientation. */ export declare function useScreenOrientation(): ScreenOrientation;