useScreenOrientation ​
sensors
test coverage
Last changed: 28 days ago
TIP
This hook uses screen.orientation browser api to provide enhanced functionality. Make sure to check for compatibility with different browsers when using this api
Hook that provides the current screen orientation
typescript
import { useScreenOrientation } from '@siberiacancode/reactuse';
Usage ​
typescript
const { supported, value, lock, unlock } = useScreenOrientation();