shadow-cljs

https://github.com/thheller/shadow-cljs | https://github.com/sponsors/thheller | https://www.patreon.com/thheller
Neros 2021-01-24T09:13:03.030700Z

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.

thheller 2021-01-24T10:23:19.030900Z

and what CLJS did you try?

Neros 2021-01-24T10:40:34.031100Z

shadow-cljs

thheller 2021-01-24T10:42:13.031300Z

no the code

thheller 2021-01-24T10:45:52.031500Z

> I have tried several different ways

Mr. Savy 2021-01-24T23:31:06.038900Z

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.

Mr. Savy 2021-01-26T00:08:00.075400Z

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.