Skip to content

QR code reader? #853

Answered by flochtililoch
hrstoyanov asked this question in Q&A
Discussion options

You must be logged in to vote

At Instawork, we have a custom element, that relies on react-native-camera.

If you haven't yet, read more about Hyperview custom elements.

Here's the simplified code for the component itself:

import Hyperview, { Events } from 'hyperview';
import React, { PureComponent } from 'react';
import { RNCamera } from 'react-native-camera';

const NAMESPACE = 'https://yourdomain.com/hyperview-qr-code-reader';

export default class HyperviewQrCodeReader extends PureComponent {
  static localName = 'qr-code-reader';

  static namespaceURI = NAMESPACE;

  static getFormInputValues = element => {
    return [
      [
        element.getAttributeNS(NAMESPACE, 'name') || 'qr-code-reader-field',
        e…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hrstoyanov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants