-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getRef={ c =>{ c.toDataURL // undefiend } how to shear QrCode as image #148
Comments
I fixed this problem by using react-native-view-shot. From "captureRef" you will get the path to the screenshot. For example you can share the screenshot with this path. Something like this:
It is more like a workaround but it works :D |
You can assign base64 to ref by this one const refQrCode = useRef();
return <>
<QrCode
getRef={c => {
if (!c?.toDataURL) return;
c?.toDataURL(base64Image => {
refQrCode.current = base64Image;
})
}}
/>
</>; |
This worked for me. |
_this.svg.toDataURL is not a function
15 |
16 | saveQRCode = () => {
The text was updated successfully, but these errors were encountered: