qrscan
QR scanner for React
See a simple demo here.
Installation and usage
First, install the component from npm.
yarn add qrscan
Then, use it in your app.
{ superprops thisstate = value: '' watching: false thisonFind = thisonFind } { this } { return <Fragment> <h1>QRScan Demo</h1> thisstatewatching ? <QRScan onFind=thisonFind /> : <Fragment> <button onClick= this>Scan</button> <h4>value: thisstatevalue</h4> </Fragment> </Fragment> }
Props
The QRScan component takes as props:
onFind
- subscribe to qr code detection