Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@svgr/babel-plugin-transform-react-native-svg
Advanced tools
Transform DOM elements into react-native-svg components
@svgr/babel-plugin-transform-react-native-svg is a Babel plugin that transforms SVG imports into React Native components. This allows developers to use SVG files as React components in a React Native project, making it easier to manage and manipulate SVG assets.
Transform SVG to React Native Component
This feature allows you to import an SVG file and use it as a React Native component. The SVG file is transformed into a React component that can be used within your React Native application.
import MyIcon from './my-icon.svg';
const App = () => (
<View>
<MyIcon width={100} height={100} />
</View>
);
Customizing SVG Properties
You can customize the properties of the SVG component, such as width, height, and fill color, directly in your React Native code.
import MyIcon from './my-icon.svg';
const App = () => (
<View>
<MyIcon width={100} height={100} fill="blue" />
</View>
);
react-native-svg is a library that provides SVG support for React Native. It allows you to create and manipulate SVG elements directly in your React Native code. Unlike @svgr/babel-plugin-transform-react-native-svg, which transforms SVG files into React components, react-native-svg provides a set of components and methods to work with SVGs programmatically.
react-native-svg-transformer is a library that allows you to import SVG files in a React Native project and use them as components. It works similarly to @svgr/babel-plugin-transform-react-native-svg but is specifically designed to work with the Metro bundler used in React Native projects.
npm install --save-dev @svgr/babel-plugin-transform-react-native-svg
.babelrc
{
"plugins": ["@svgr/babel-plugin-transform-react-native-svg"]
}
MIT
FAQs
Transform DOM elements into react-native-svg components
The npm package @svgr/babel-plugin-transform-react-native-svg receives a total of 2,760,184 weekly downloads. As such, @svgr/babel-plugin-transform-react-native-svg popularity was classified as popular.
We found that @svgr/babel-plugin-transform-react-native-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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.