react-native-vision-cameraFunctions
useOrientation
function useOrientation(source:
| OrientationSource
| undefined):
| CameraOrientation
| undefinedReactively use the current source CameraOrientation.
'interface'will listen to UI-orientation.'device'will listen to physical phone orientation.undefinedwill returnundefinedand not listen to anything.
Example
const orientation = useOrientation('device')
// orientation: 'up' | 'right' | 'down' | 'left' | undefined