UNPKG

react-native-full-responsive

Version:

Create a fully responsive React Native app for all supported platforms

14 lines 480 B
import { useMemo } from 'react'; import { rh } from '../layout'; import { useWindowDimensions } from 'react-native'; const useResponsiveHeight = heightPercentage => { const { height: screenHeight } = useWindowDimensions(); const height = useMemo(() => { return rh(heightPercentage, screenHeight); }, [heightPercentage, screenHeight]); return height; }; export { useResponsiveHeight, useResponsiveHeight as useRH }; //# sourceMappingURL=useResponsiveHeight.js.map