I am trying to get a QR code scanner to work in my project, I have tried several different ways but I am still getting problems. The most basic QR code example in react I have found is the following: I am trying to get a QR code scanner to work in my project, I have tried several different ways but I am still getting problems. The most basic QR code example in react I have found is the following:
import React from 'react';
import BarcodeScannerComponent from "react-webcam-barcode-scanner";
function App() {
const [ data, setData ] = React.useState('Not Found');
return (
<>
<BarcodeScannerComponent
width={500}
height={500}
onUpdate={(err, result) => {
if (result) setData(result.text)
else setData('Not Found')
}}
/>
<p>{data}</p>
</>
)
}
export default App;
Any suggestions would be most grateful, thanks.and what CLJS did you try?
shadow-cljs
no the code
> I have tried several different ways
are there any tutorials anywhere online for building and deploying a shadow app as a jar? I tried just compiling it to js but I can't figure out how to get that working on a server. @neo2551 that article you linked was interesting but I couldn't figure out how to get it working with my use case.
you're absolutely right! that's what i've been trying to do, unfortunately without much success. although, having thought about it some, I think building it isn't the issue. I can run the build after a release, but it crashes when i try to move it over to the server. so i think I need to get it onto the server in a form it recognizes, I'm going to try node and see if that gives any headway.