0.6.1 • Published 1 year ago

@akashalib/use-qr-code v0.6.1

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

@akashalib/use-qr-code

React hook to generate QR code link.

Install

npm install @akashalib/use-qr-code
# OR
yarn add @akashalib/use-qr-code

Usage

import { useQrCode } from "@akashalib/use-qr-code";

const Example = ({ size = 400 }) => {
  const qrCodeSrc = useQrCode("https://something.com", size)

  return <img src={qrCodeSrc} width={size} height={size} />
}