How to use the qrcode.create function in qrcode

To help you get started, we’ve selected a few qrcode examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pillarwallet / pillarwallet / src / components / QRCode / QRCode.js View on Github external
async generateQRCode() {
    const { value } = this.props;
    await delay(800);
    const qrCodeSrc = await qrcode.create(value);
    const arr = [...qrCodeSrc.modules.data];
    const sqrMatrix = this.generateSquareMatrix(arr);
    this.setState({
      sqrMatrix,
      isGenerating: false,
    });
  }