@drivekyte/react-native-qrcode-scanner
v1.0.0
Published
Kyte mobile React Native QRCode Scanner
Downloads
1
Readme
@drivekyte/react-native-camera-qrcode-scanner
Kyte Mobile react-native-qrcode-scanner
Installation
yarn add react-native-vision-camera vision-camera-code-scanner react-native-reanimated@^2.17.0 && npx pod-install
Follow the reanimated setup, make sure to import the react-native-reanimated at your first line in index.tsx
import 'react-native-reanimated'
Add this to your babel.config.js
[
'react-native-reanimated/plugin',
{
globals: ['__scanCodes'],
},
];
Usage
import { QRCodeModal } from '@drivekyte/react-native-qrcode-scanner';
return (
<QRCodeModal
inputManuallyText={"Input manually"}
noDeviceMessage={"No device"}
noPermissionMessage={"Missing permission"}
noPermissionCta={{
text: "Go to Settings",
onPress: Linking.openSettings,
}}
onClose={onClose}
onQRCodeScanned={onQRCodeScanned}
onManualInputPressed={onManualInputPressed}
title={title}
visible={visible}
/>
)