Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react native import svg image

yarn add react-native-svg         
yarn add react-native-svg-uri
npx react-native link react-native-svg
...
import * as React from 'react';
import SvgUri from 'react-native-svg-uri'; // SVG Package
import testSvg from './test.svg';          // SVG File
export default () => (
  <SvgUri width="200" height="200" svgXmlData={testSvg}/>
);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #react #native #import #svg #image
ADD COMMENT
Topic
Name
7+9 =