react-native-scanner-listener
v1.0.3
Published
QR Code or Bar code Scanner device input receiver component library for react native.
Downloads
15
Maintainers
Readme
react-native-scanner-listener
QR Code or Bar code Scanner device input receiver component library for react native.
Install
npm install react-native-scanner-listener --save
Usage
** package.json **
"react-native-scanner-listener": "^1.0.0",
** Your Component file **
import ScannerInputListener from "react-native-scanner-listener";
const RunnerScreen = props => {
// * Handle QR code scanning order done function.
const handleScanComplete = qrCodeString => {
if (qrCodeString) {
// Do Your Stuff
}
};
return (
<ScannerInputListener OnComplete={handleScanComplete}>
<YourRestOfCode />
</ScannerInputListener>
);
};
| Prop | Description | Default Value | Example |
| -------------- | ------------------------------------------------------ | ----------------- | ------------------------------------------------ |
| OnComplete | Callback function hits after device complete the scan. | | OnComplete={qtString => console.log(qtString)}
|
CHEERS. YOU ARE GOOD TO GO...
License
MIT © v4irajvimu