Function useDeviceOrientation
useDeviceOrientation( options?: DeviceOrientationOptions,): { cleanup: () => void; requestPermission: () => Promise<boolean>; startListening: () => Promise<boolean>; stopListening: () => void; get state(): DeviceOrientationState; subscribe(callback: (state: DeviceOrientationState) => void): () => boolean;} Parameters
- options: DeviceOrientationOptions = {}
Returns {
cleanup: () => void;
requestPermission: () => Promise<boolean>;
startListening: () => Promise<boolean>;
stopListening: () => void;
get state(): DeviceOrientationState;
subscribe(callback: (state: DeviceOrientationState) => void): () => boolean;
}