Environment info
React native info output:
"react": "16.8.6",
"react-native": "0.60.4"
Library version: 1.2.3
Steps To Reproduce
- Create a fresh project using react-native-cli.
- Bring in an SVG file into the
src
folder of the project (I downloaded and used the homer simpson image mentioned in the documentation of react-native-svg-uri for the test ). - Import the svg as
import MySVG from './mysvg.svg';
- Pass
MySVG
intosvgXmlData
property ofSvgUri
component
Expected behaviour
The image should render on screen
Reproducible sample code
import React from 'react';
import SvgUri from 'react-native-svg-uri';
import MySVG from './mysvg.svg';
const MyComponent = () => {
return (
<>
<SvgUri
svgXmlData={MySVG}
width="25"
height="25"
/>
</>
);
};
export default MyComponent;