React Native hook for Dimensions
npm install @rnhooks/dimensions> React Native hook for Dimensions
``bash`
$ yarn add @rnhooks/dimensions$3
`
import useDimensions from '@rnhooks/dimensions';
function App() {
const { fontScale, width, height, scale } = useDimensions('window');
return (
}
}
}
);
}
`
| null | string | Type window or screen Dimension |
$3
| Name | Type | Default | Description |
| :------------ |---------------:| :---------------| :-----|
| width | number | null | Width of the Screen |
| height | number | null | Height of the Screen |
| fontScale | number | null | Font Scale of the Screen |
| scale | number | null` | Scale of the Screen |Feel free to contact me or create an issue