# mainam-react-js-qrcode-scanner

> barcode scanner using camera

Latest version **1.0.1** (published 2020-09-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install mainam-react-js-qrcode-scanner
pnpm add mainam-react-js-qrcode-scanner
yarn add mainam-react-js-qrcode-scanner
bun add mainam-react-js-qrcode-scanner
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-09-08 |
| First published | 2020-09-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | MaiNam |
| Maintainers | mainam |
| Keywords | react, webcam, barcode, scanner, camera |

## Links

- npm: https://www.npmjs.com/package/mainam-react-js-qrcode-scanner
- npm.io page: https://npm.io/package/mainam-react-js-qrcode-scanner

## Dependencies (3)

- [@types/react](https://npm.io/package/@types/react.md) ^16.9.35
- [react-webcam](https://npm.io/package/react-webcam.md) ^5.2.0
- [@zxing/library](https://npm.io/package/@zxing/library.md) ^0.17.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2020-09-08
- 1.0.0 — 2020-09-08

## README

# MaiNam ReactJs Barcode Scanner

This lib provide a webcam-based barcode scanner using [react-webcam](https://github.com/mozmorris/react-webcam) and [@zxing/library](https://github.com/zxing-js/library).

## Installation

```
npm i mainam-react-js-barcode-scanner
```

## Usage in React:

```jsx
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;
```

---
_Source: https://npm.io/package/mainam-react-js-qrcode-scanner · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
