Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-native-auto-height-image-expo
Advanced tools
Initialized by vivaxy/gt-npm-package
This component provides you a simple way to load a remote image and automatically set Image
height to the image dimension which fits the provided width.
React Native Image
component needs users to set both width
and height
props.
React Native version requirements: >=0.69.4
yarn add react-native-auto-height-image
npm install react-native-auto-height-image
Use local or remote files:
import React, { Component } from 'react';
import AutoHeightImage from 'react-native-auto-height-image';
import image from 'gallifrey-falls.png';
export default class Demo extends Component {
render() {
return (
<View>
<AutoHeightImage
width={100}
source={image}
/>
<AutoHeightImage
width={100}
source={{uri: 'http://placehold.it/350x150'}}
/>
</View>
);
}
}
You can even specify fallback images for when the source fails to load:
import React, { Component } from 'react';
import AutoHeightImage from 'react-native-auto-height-image';
import image from 'gallifrey-falls.png';
export default class Demo extends Component {
render() {
return (
<AutoHeightImage
width={100}
source={{uri: 'https://vivaxy.github.io/404'}}
fallbackSource={image}
/>
);
}
}
name | type | isRequired | default | description |
---|---|---|---|---|
width | number | ✔ | N/A | image width to fit |
maxHeight | number | ✖ | Infinity | image max height |
source | number or object | ✔ | N/A | local (i.e. require/import) or remote image ({uri: '...'}) |
fallbackSource | number or object | ✖ | N/A | local (i.e. require/import) or remote image ({uri: '...'}) |
onHeightChange | func | ✖ | (height) => {} | called when updating image height, the argument height might be 0 |
animated | bool | ✖ | false | Use Animated.Image instead of Image |
Other image props except resizeMode
are accepted.
This project exists thanks to all the people who contribute. [Contribute].
Become a financial contributor and help us sustain our community. [Contribute]
Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]
FAQs
react-native auto height image
The npm package react-native-auto-height-image-expo receives a total of 1 weekly downloads. As such, react-native-auto-height-image-expo popularity was classified as not popular.
We found that react-native-auto-height-image-expo demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.