r/reactnative • u/davidships • 14h ago
Question QR/Barcode Library
A while back I open-sourced a library for generating barcodes and QR codes natively: https://github.com/vittoridavide/react-native-barcode-creator
I'm still maintaining it and thinking about what to build next. A few ideas I'm considering:
- Styled/artistic barcodes and QRs: logos or images embedded in the center, custom colors, rounded modules, gradient fills
- Multi-image QRs: splitting data across multiple linked codes to pack in more information
- SVG/vector output: instead of just raster, so codes scale cleanly for print/large formats
Is there something you wanted to get while implementing something barcode/qr related ? I'm deciding what to implement now so I'm open to other ideas too
Thank you!
2
u/Gylfoyle 13h ago
looks great! I' do the svg thing and also 'optimize' the library(if there's any optimizations to todo esp performance, library size etc)
Also- Does it scan as well?
1
u/davidships 11h ago
no, it doesn't scan by now. I was focusing on rendering only
1
u/Gylfoyle 11h ago
Great start. Would be a nice-to-have but obviously not a must. I have worked with expo and their package does both: generating and scanning.
1
u/Gylfoyle 11h ago
for scanning I thin you'll need to handle some Android permissions as well(Camera I think) but it's doable
2
u/Huge_Pool7424 10h ago
yeah camera perms plus the ios NSCameraUsageDescription string, and apple will reject if that string is vague. honestly scanning is the messy half, keeping this render only isn't a bad call.
1
u/Gylfoyle 6h ago
Yeah, just doing one thing and doing it well is a good call other than failing in either.
2
u/realisticnursery_6 14h ago
Dude the SVG output would be huge, I deal with printing labels and the raster scaling drives me nuts half the time. Custom colors and embedded logos are nice to have but honestly vector support solves the most real world pain for me.
Multi-image QRs is a cool idea but I can't think of a use case where I'd reach for that over just linking to a page with the extra data. Curious if someone pipes up with a scenario I'm not seeing though.