Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 390 Bytes

use-orientation.mdx

File metadata and controls

20 lines (14 loc) · 390 Bytes

import { HooksDemos } from '@docs/demos'; import { Layout } from '@/layout'; import { MDX_DATA } from '@/mdx';

export default Layout(MDX_DATA.useOrientation);

Usage

useOrientation returns an object with the current orientation of the device:

Definition

function useOrientation(): {
  angle: number;
  type: string;
};