Socket
Socket
Sign inDemoInstall

barcode-react-scanner

Package Overview
Dependencies
9
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    barcode-react-scanner

react component to scan barcode


Version published
Weekly downloads
198
decreased by-15.02%
Maintainers
1
Install size
13.2 MB
Created
Weekly downloads
 

Readme

Source

Build Status Coverage Status

barcode-react-scanner

Is a simple react component to read barcodes.

How to use ?

Install

Recommended way to install is by using package manager (npm, yarn etc):

npm i barcode-react-scanner

or

yarn add barcode-react-scanner

Use

import React, { useState } from 'react';
import BarCodeScanner from 'barcode-react-scanner';

const TestingComponent = (): JSX.Element => {

 const [code, setCode] = useState<string>('')

 return (
     <>
     { code && <p> code </p> }
     <BarCodeScanner onUpdate={ (err, resp): void => {
         if(resp) {
             setCode(resp.getText())
         }
      }}
    />
    </>
 );

}

export default TestingComponent;

Keywords

FAQs

Last updated on 18 Oct 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc