
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
react-native-fast-svg
Advanced tools
Render an SVG Images from url (using react-native-svg-uri), plus caching
Render SVG images in React Native from using a URL or a static file
URL SVG's are cached using react native's Async Storage.
Forked from 'react-native-svg-uri'.
Install library from npm
npm install react-native-fast-svg --save
Link library react-native-svg
react-native link react-native-svg # not react-native-fast-svg !!!
Prop | Type | Default | Note |
---|---|---|---|
source | ImageSource | Same kind of source prop that <Image /> component has | |
svgXmlData | String | You can pass the SVG as String directly | |
fill | Color | Overrides all fill attributes of the svg file | |
fillAll | Boolean | Adds the fill color to the entire svg object | |
noCache | Booleean | will not cache this particular SVG if true. default is false |
Here's a simple example:
import SvgUri from 'react-native-svg-uri';
const TestSvgUri = () => (
<View style={styles.container}>
<SvgUri
width="200"
height="200"
source={{uri:'http://thenewcode.com/assets/images/thumbnails/homer-simpson.svg'}}
/>
</View>
);
or a static file
<SvgUri width="200" height="200" source={require('./img/homer.svg')} />
This will render:
npm i
npm test
FAQs
Render an SVG Images from url (using react-native-svg-uri), plus caching
We found that react-native-fast-svg 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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.