- Native code based
- Write with Objective-C and Kotlin
- New Architecture support
- Base64 based png export
npm i react-native-qr
# or (yarn)
yarn add react-native-qr
# or (pnpm)
pnpm i react-native-qr
# or (bun)
bun add react-native-qr
You need to install pods
cd ios && pod install
Autolinking on android side !
import { generateQrCode } from 'react-native-qr';
const SIZE = 250;
const TEXT = 'https://orkunkarakus.com';
// ...
const [result, setResult] = useState<string | undefined>();
useEffect(() => {
generateQrCode(TEXT, SIZE).then((img: string | undefined) => {
if (!img) {
return;
}
setResult(img);
});
}, []);
// ...
return (
// ...
<Image
source={{
uri: result
}}
style={{
width: SIZE,
height: SIZE
}}
/>
// ...
);
See the contributing guide to learn how to contribute to the repository and the development workflow.
- MIT
Built with