Socket
Socket
Sign inDemoInstall

react-qrcode

Package Overview
Dependencies
33
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.3 to 0.2.0

CHANGELOG.md

51

package.json
{
"name": "react-qrcode",
"version": "0.1.3",
"description": "QR code for ReactJS",
"main": "QRcode.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/iaalm/react-qrcode.git"
},
"dependencies": {
"react": "^0.12.1",
"jquery": "^2.1.3"
},
"version": "0.2.0",
"description": "🤳 A React component for QR code generation with `qrcode`",
"repository": "git@github.com:rx-ts/react.git",
"homepage": "https://github.com/rx-ts/react/blob/master/packages/react-qrcode",
"author": "JounQin <admin@1stg.me>",
"license": "MIT",
"main": "lib/cjs",
"module": "lib",
"jsdelivr": "lib/umd",
"unpkg": "lib/umd",
"es2015": "lib/es2015",
"esm5": "lib",
"fesm5": "lib/esm",
"types": "lib",
"files": [
"lib",
"src"
],
"keywords": [
"QR",
"ReactJS",
"QRcode"
"react-qrcode",
"qrcode",
"react"
],
"author": "Iaalm",
"license": "ISC",
"bugs": {
"url": "https://github.com/iaalm/react-qrcode/issues"
"peerDependencies": {
"qrcode": ">=1.0.0",
"react": ">=16.9.0"
},
"homepage": "https://github.com/iaalm/react-qrcode#readme"
"publishConfig": {
"access": "public"
},
"sideEffects": false,
"gitHead": "d17aa58d47229c3d003c49a343abb5d50a6c8abe"
}

@@ -1,28 +0,44 @@

react-qrcode
====
QR code for ReactJS
# ReactQRCode
> 🤳 A React component for QR code generation with [qrcode](https://github.com/soldair/node-qrcode)
Install
------
`npm install react-qrcode`
## Usage
Use
---
`<QRcode text="http://www.pairyo.com/" width=256 height=256 />`
```tsx
// Component
import ReactDOM from 'react-dom'
import { QRCode } from 'react-qrcode'
Creator
----
[iaalm](https://github.com/iaalm)
ReactDOM.render(<QRCode value="https://www.1stg.me" />)
Contributors
---
[hophacker](https://github.com/hophacker)
// hooks
import { useQRCode } from 'react-qrcode'
[zhcalvin](https://github.com/zhcalvin)
export const App = () => {
const [value, setValue] = useState('https://www.1stg.me')
const dataUrl = useQRCode(value)
return (
<>
<div>dataUrl: {dataUrl}</div>
<img src={dataUrl} />
<input onChange={e => setValue(e.currentTarget.value)} />
</>
)
}
```
Thanks
----
## Available Props
Thanks to jeromeetienne's [jquery-qrcode](https://github.com/jeromeetienne/jquery-qrcode). Honestly, pairyo copied your code, but we found this is a must as react is hot, and we need to provide an alternative.
| prop | type (range) | default value |
| ---------------------- | ------------------------------------------------------------------ | ------------------------------------------- |
| `version` | `number` (1-40) | N/A |
| `errorCorrectionLevel` | `String` ('low', 'medium', 'quartile', 'high', 'L', 'M', 'Q', 'H') | `'M'` |
| `maskPattern` | `number` (0-7) | N/A |
| `toSJISFunc` | `Function` | N/A |
| `margin` | `number` | `4` |
| `scale` | `number` | `4` |
| `width` | `number` | N/A |
| `color` | `{ dark: string; light:string }` | `{ dark: '#000000ff', light: '#ffffffff' }` |
| `type` | `string` ('image/png', 'image/jpeg', 'image/webp') | `'image/png'` |
| `quality` | `number`(0-1) | `0.92` |
| `value` | `string | Array<{ data: string; mode?: string }>` | N/A |

Sorry, the diff of this file is not supported yet

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