code qr code

mail@pastecode.io avatar
unknown
javascript
3 years ago
637 B
16
Indexable

import QRCode from 'react-native-qrcode-svg';
export default function QrCodePage({ navigation }) {

     const shareQR = ()=>  {
    this.svg.toDataURL((data) => {
      const shareImageBase64 = {
        title: "QR",
        message: "Ehi, this is my QR code",
        url: `data:image/png;base64,${data}`
      };
      Share.open(shareImageBase64);
    });
  }

 return (
    <QRCode
             size={180}
             value={"https://www.detik.com/"}
            //  getRef={(c) => {
            //    console.log(`nilai c ${JSON.stringify(c)}`)
            //  }}
             getRef={(ref) => (svg = ref)}


            />

)

}