nimiq / qr-scanner

Lightweight Javascript QR Code Scanner
https://nimiq.github.io/qr-scanner/demo
MIT License
2.51k stars 537 forks source link

Can this be used with Next.js? #173

Open kcrtr opened 2 years ago

kcrtr commented 2 years ago

I haven't been able to figure it out, please forgive me I'm still in my learning stages with development.

wesbos commented 2 years ago

I've had trouble with these types on things on Next.js because it's rendered both on the server and the client.

https://github.com/kybarg/react-qr-scanner/issues/38 Here is a very similar issue that might be able to thelp

danimoh commented 2 years ago

Do you know what exactly is not working? Starting the scanner obviously won't work on the server, so the more interesting thing is whether creating a QrScanner instance at least works or if not, what in the constructor is incompatible with SSR.