react-native-scanner-listener

1.0.3 • Public • Published

react-native-scanner-listener

QR Code or Bar code Scanner device input receiver component library for react native.

NPM JavaScript Style Guide

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

Package Sidebar

Install

npm i react-native-scanner-listener

Weekly Downloads

4

Version

1.0.3

License

MIT

Unpacked Size

3.86 kB

Total Files

3

Last publish

Collaborators

  • v4irajvimu