1.0.2 • Published 5 years ago
react-native-scan-listener v1.0.2
react-native-scan-listener
QR Code or Bar code Scanner device input receiver component library for react native.
Install
npm install react-native-scan-listener --save
Usage
package.json
"react-native-scan-listener": "^1.0.0",
Your Component file
import ScannerInputListener from "react-native-scan-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