A modern QR scanner built using React Native Vision Camera.
Features a modal-based camera view, clean permission handling screen, scan result alert popup, and displays last scanned value on the home screen.
- 📷 High-performance camera using
react-native-vision-camera - 🔍 QR Code scanning
- 💡 Modal-based camera UI
- 🔐 Smooth camera permission handling screen
- 🔔 Alert popup after successful scan
- 📝 Displays last scanned result on screen
- 🚫 Prevents multiple scan triggers
- 🎨 Clean and minimal UI
- React Native
- TypeScript
- react-native-vision-camera
git clone https://github.com/dev78ashish/react-native-qr-code-scanner.git
cd react-native-qr-code-scannernpm install
# or
yarn installcd ios && pod install && cd ..Add the following to your Info.plist:
<key>NSCameraUsageDescription</key>
<string>We need camera access to scan QR codes</string>Add the following to your AndroidManifest.xml:
<uses-permission android:name="android.permission.CAMERA" />npx react-native run-iosnpx react-native run-android- Launch the app
- Tap the "Grant Permission" button
- Grant camera permissions
- Tap the "Open Camera" button
- Point the camera at a QR code
- View the scanned result in an alert and on the home screen
react-native-qr-code-scanner/
├── src/
│ ├── components/
│ │ ├── CameraComponent.tsx # Main camera scanner component
│ └── screens/
│ └── HomeScreen.tsx # Home screen with scan button
│
├── android/ # Android native code
├── ios/ # iOS native code
├── package.json
└── App.tsx # Root component
Modify styles in each component file to match your app's design system.
{
"react-native-vision-camera": "^4.7.3",
}- Ensure permissions are granted in app settings
- Check that
AndroidManifest.xmlincludes camera permission - Verify that the device has a working camera
- Run
cd ios && pod install && cd .. - Clean build folder in Xcode:
Product > Clean Build Folder - Delete
ios/Podsandios/Podfile.lock, then reinstall pods
- Ensure you're using the correct version of
react-native-vision-camera - Rebuild the app after installing the vision camera package
- Check that Reanimated worklets are properly configured
- react-native-vision-camera - Amazing camera library
If you have any questions or need help, please open an issue on GitHub.
Happy Scanning! 📱✨