QR Code Generator

Please provide the following:

  1. SDK Version:36.0.0
  2. Platforms(Android/iOS/web/all):all

Hi, i need to generate a QRCode to my users but have found nothing in Expo documentation besides read qrcode. I tried some third libraries without success.

i was using react-native-barcode-builder - npm to build a barcode but after updating to 36 stoped work.

same question

react-native-barcode-builder uses ART which was removed from SDK 36. With a little bit of effort you can actually use JsBarcode directly:

The Snack is called “Better” because the first version I tried was more hacky and buggy.

I’m not sure what the best way is to generate barcodes in Expo, but my Snack seems to work :slight_smile:

However, I don’t believe JsBarcode supports 2D barcodes like QR codes. So the Snack is off topic.

About QR code generation:

react-native-qr-generator won’t work because it requires native code that is not included in Expo.

But the other two options you mentioned both work pretty well:

The logo didn’t work in the Snack’s web preview, but that might just be Snack being quirky. I didn’t try it locally. Also, the linear gradient didn’t work on my Android phone. All the other stuff I tried worked, but I only tried a few options.

Note: react-native-svg is already built in to Expo, so there is no need to run react-native link to use these two libraries.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.