javascript - How can I show SVG file on React Native? -
i want show svg files (i have bunch of svg images) thing couldn't find way show. tried use image , use components of react-native-svg don't work that. , tried native way it's hard work show svg image.
example code:
import svg, { use, image, } 'react-native-svg'; <view> <svg width="80" height="80"> <image href={require('./svg/1f604.svg')} /> </svgrn> </view>
also know react native doesn't support svg think fix problem tricky way (with/without react-native-svg)
after try many ways , libraries decided create new font (with glyphs app) , add svg files it, use "text" component custom font. hope have problem svg in react-native.
Comments
Post a Comment