Answer the question
In order to leave comments, you need to log in
How to render svg markup react-native expo?
application, I make a get request, receive a response
svg markup
, this data is SVG markup (QR code) and I can’t display it in any way.
Answer the question
In order to leave comments, you need to log in
to display svg code in react-native + expo you need
1 Create a file
2 Get svg code using axios
3 Write data to generated file
4 Display using package
import Qrcode from 'react-native-qrcode-svg';
<Qrcode logo={{uri: путь до созданного файла}} logoSize={0} size={200}/>
If you go here https://github.com/react-native-community/react-na... and scroll a bit you will find an example
Import your .svg file inside a React component:
import Logo from "./logo.svg";
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question