Object containing both screen and window dimensions.
Use this hook to access the screen dimensions only.
const { height, width, fontScale, scale } = useScreenDimensions();
Object containing screen dimensions
Use this hook to access the window dimensions only.
This can be useful on Android devices, where the window has different dimensions than the screen.
const { height, width, fontScale, scale } = useWindowDimensions();
Object containing window dimensions
Generated using TypeDoc
Use this hook to access both the screen and window dimensions.
const { screen, window } = useDimensions();