Skip to content
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

Programmatic rendering #3

Open
chrislondon opened this issue Mar 4, 2023 · 2 comments
Open

Programmatic rendering #3

chrislondon opened this issue Mar 4, 2023 · 2 comments

Comments

@chrislondon
Copy link

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?

@lanchana
Copy link

lanchana commented Mar 9, 2023

+1

@predam
Copy link

predam commented Apr 9, 2023

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!

@github-staff github-staff deleted a comment from carlosfgti May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants