Search code examples
reactjshttpsqr-codereact-qr-code

QR code generator for email using reactjs


So I am trying to generate QR code using react-qr-code module in the value field I gave mailto:${email}?subject=${subject}&body=${body} format but when I scan using google lens it's getting converted to https://mailto:_______ which will not work how to resolve this issue?


Solution

  • mailto:${encodeURIComponent(email)}?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}

    will work