quagga2-react-example icon indicating copy to clipboard operation
quagga2-react-example copied to clipboard

Hooks instead of Scanner component

Open kaisheng1 opened this issue 5 years ago • 1 comments

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)

kaisheng1 avatar Mar 30 '20 09:03 kaisheng1

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 :)

ericblade avatar Apr 03 '20 00:04 ericblade