
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@allsquare/react-native-svg-from-uri
Advanced tools
This is a fork of the unmaintained react-native-svg-uri library, originally written by Matias Cortes.
Render SVG images in React Native from an URL or a static file
This was tested with RN 0.52.0 and react-native-svg 6.3.1, which this library depends on.
Install library from npm
npm install react-native-svg-from-uri --save
Link the react-native-svg library
react-native link react-native-svg # not react-native-svg-from-uri !
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 |
Here's a simple example:
import SvgUri from "react-native-svg-from-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:
yarn
yarn test
FAQs
Render an SVG Image from an URL
We found that @allsquare/react-native-svg-from-uri 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.