react-native-orientation-locker
react-native-orientation-locker copied to clipboard
TypeError: undefined is not an object (evaluating '_reactNativeOrientationLocker.OrientationType.PORTRAIT')
Not sure what's up but I can't use the enum from import.
Using it like so
import { OrientationType, useOrientationChange } from 'react-native-orientation-locker';
...
const onOrientationChange = useCallback(orientation => {
setIsVisible(orientation === OrientationType.PORTRAIT);
}, []);
useOrientationChange(onOrientationChange);
try to fixed: #203