useOrientation ​
browser
test coverage
Last changed: 27 days ago
TIP
This hook uses window.screen.orientation browser api to provide enhanced functionality. Make sure to check for compatibility with different browsers when using this api
Hook that returns the current screen orientation
typescript
import { useOrientation } from '@siberiacancode/reactuse';
Usage ​
typescript
const { angle, type } = useOrientation();