useDeviceOrientation
Track device rotation and orientation.
useDeviceOrientation.tsx
import { useDeviceOrientation } from "@cermuel/hooks/react";export function useDeviceOrientationExample() { const orientation = useDeviceOrientation(); return <p>{orientation.alpha ?? 0}</p>;}Props
Param
Type
Default Value
No props for this hook
Returns
DeviceOrientationSnapshot