qr-code
qr-code copied to clipboard
Programmatic rendering
I'm using React and the library doesn't seem to recognize elements generated on the fly. Is there a programmatic way to generate a QR code?
+1
Hello guys, I am using this web component in React like this.
import * as qr from "@bitjson/qr-code";
const YourComponent = () => {
useEffect(() => {qr.defineCustomElements(window)}, [])
return (
<>
<qr-code
contents="https://bitjson.com"
style={{ width: "200px", height: "200px" }}></qr-code>
<>)'
}
I hope it helps!