Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-qrcode-hook

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-qrcode-hook

React hook for creating QR Code data urls

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
44
increased by12.82%
Maintainers
1
Weekly downloads
 
Created
Source

React QRCode Hook 👾

All Contributors

React hook for creating QR Code data urls

Edit useReact hook

Install

yarn add react-qrcode-hook

or

npm install --save react-qrcode-hook

Usage

This hook returns a data URL which can be added as the source to an image. The only parameter to the hook function is the string you want to codify.

import useQrCode from "react-qrcode-hook";

function App() {
  useQrCode("Hello There");
  return (
    <div
      style={{
        width: "100%",
        height: "100%",
        display: "flex",
        alignItems: "center",
        justifyContent: "center"
      }}
    >
      <img alt="qr code" src={qrCode} />
    </div>
  );
}

Example

In the project folder:

yarn
yarn example

or

npm install
npm run example

Contributors

Thanks goes to these wonderful people (emoji key):


Alex

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

Keywords

FAQs

Package last updated on 01 Mar 2019

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc