quagga2-react-example
quagga2-react-example copied to clipboard
Hooks instead of Scanner component
It's a really good example here and I learned a lot from this. However, it might be better if you can make it a hook instead of a component, as the component doesn't really return any JSX element. Like useScanner or useBarcode and accept some parameters maybe. I might be able to pull a request if you need it. (or maybe no)
I would welcome that! Returning null is weird from a component, and I'm kinda staring at that wondering what I was thinking. Maybe so that the layout doesn't get any weirder than it already is.
Pull reqs are always welcome, right now i've got little coding time, and lots and lots of coding to do to make quagga more modern :)