Read the orientation of the screen, portrait or landscape, and its angle.
This is custom React hooks, you need to follow the Basic Rules when you use it.
Rotate the device to see the values change.
const useOrientation = (defaultValue?: {
angle: number
type: OrientationType
}) => { angle: number; type: OrientationType }