A Lib React Native to get the real dimensions.
This library was developed to solve a simple problem that generates a big headache. 👌
npm install react-native-resize
# or
yarn add react-native-resizeimport { widthResize, heightResize } from "react-native-resize";
import { Image } from "react-native";
<Image
source={{ uri: 'https://example_url_image.com.br' }}
width={widthResize(200)}
height={heightResize(200)}
/>| arguments | Description | |
|---|---|---|
| widthResize | value: string | The width will be calculated based on the pixel ratio of each device |
| heightResize | value: string | A altura será calculada com base no pixel ratio de cada dispositivo |
| fontResize | value: string | Resizes font for responsiveness based on device aspect ratio |
See the contributing guide to learn how to contribute to the repository and the development workflo
MIT