react-native-svg-image | Load SVG images from network ; Does not work | Animation library
kandi X-RAY | react-native-svg-image Summary
kandi X-RAY | react-native-svg-image Summary
Load SVG images from network; Does not work with local svgs
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of react-native-svg-image
react-native-svg-image Key Features
react-native-svg-image Examples and Code Snippets
Community Discussions
Trending Discussions on react-native-svg-image
QUESTION
I have started a project using 'create-react-native-app' and I can't figure out how to render .svg files. I tried all libraries for svg like react-native-svg-uri, react-native-svg-image, msvgc (converting .svg to react components with react-native-svg) and none of these helps. Sometimes when I run app preview (with expo) on my phone it crashes instantly and sometimes it only shows loading animation - instead of showing actual .svg image. There is no errors - it simply won't render svgs.
For example, this code shows loading animation
...ANSWER
Answered 2017-May-05 at 20:02This appears to be a problem with the react-native-svg-image library not being tested on iOS. When you use the html
prop on a WebView
on iOS, you can't set startInLoadingState={true}
, otherwise the loading indicator never goes away. This is a behavior that has existed for a long time in react-native, see issue 542 for more information -- it's certainly not ideal though, and hopefully someone reads this and fixes it!
You can get around this by setting showWebviewLoader
prop to false
on the component.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-native-svg-image
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page