Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hooks instead of Scanner component #5

Open
kaisheng1 opened this issue Mar 30, 2020 · 1 comment
Open

Hooks instead of Scanner component #5

kaisheng1 opened this issue Mar 30, 2020 · 1 comment

Comments

@kaisheng1
Copy link

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)

@ericblade
Copy link
Owner

ericblade commented Apr 3, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants