React Qr Code
react-qr-code
A QR code generator for React and React Native.
React Native Libraries
code
generator
qr
react
react-native
react-qr-code
React Native Libraries
javascript
npm
frontend
Stars
893
Weekly
2.5M
Open issues
8
Bundle
~25 kB
Installation
npm install react-qr-codeCode example
import { View, Text, StyleSheet } from "react-native";
import { QrCode } from "react-qr-code";
export function Example() {
return (
<View style={styles.box}>
<Text style={styles.title}>React Qr Code</Text>
<QrCode />
</View>
);
}
const styles = StyleSheet.create({
box: { flex: 1, alignItems: "center", justifyContent: "center", gap: 8 },
title: { fontSize: 18, fontWeight: "600" },
});Pros & cons
Pros
- Actively maintained by Ross Khanas
- 2.5M weekly downloads. Battle tested
- First-class TypeScript definitions
- MIT licensed
Considerations
- Adds roughly ~25 kB to your bundle
- Needs client-only rendering in SSR frameworks
- 8 open issues on GitHub