Socket
Socket
Sign inDemoInstall

mainam-react-js-barcode-scanner

Package Overview
Dependencies
631
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mainam-react-js-barcode-scanner

barcode scanner using camera


Version published
Weekly downloads
2
increased by100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

MaiNam ReactJs Barcode Scanner

This lib provide a webcam-based barcode scanner using react-webcam and @zxing/library.

Installation

npm i mainam-react-js-barcode-scanner

Usage in React:

import React from 'react';
import BarcodeScannerComponent from "mainam-react-js-barcode-scanner";

function App() {

  const [ data, setData ] = React.useState('Not Found');

  return (
    <>
      <BarcodeScannerComponent
        width={500}
        height={500}
        onUpdate={(err, result) => {
          if (result) setData(result.text)
          else setData('Not Found')
        }}
      />
      <p>{data}</p>
    </>
  )
}

export default App;

Keywords

FAQs

Last updated on 08 Sep 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