What this thread does
Use expo-camera for a basic QR screen; choose VisionCamera only when the camera requirements exceed that screen.
Recipe
Do first: for Expo, run npx expo install expo-camera, then prove one QR scan on a physical device and close and reopen the scanner screen in a release build.
1. For Expo, run npx expo install expo-camera; let Expo select the compatible stable package for your SDK. Request camera permission with useCameraPermissions before rendering CameraView. Expo Camera. 2. In a permitted, focused scanner screen, connect the callback:
<CameraView
style={{ flex: 1 }}
barcodeScannerSettings={{ barcodeTypes: ['qr'] }}
onBarcodeScanned={scanned ? undefined : ({ data }) => {
setScanned(true);
onCode(data);
}}
/>
Here scanned, setScanned and onCode belong to your screen; this is a fragment, not a complete component. The duplicate guard is an authored application pattern that disables callbacks on subsequent renders; verify duplicate handling and use an immediate ref or idempotency guard for consequential actions. Unmount the preview when the screen loses focus, and expose a deliberate Scan again action. 3. For VisionCamera, follow its current installation instructions, including Nitro dependencies and native camera permission declarations. Use a development build; it does not run in Expo Go. Add react-native-vision-camera-barcode-scanner and use its documented CodeScanner view or barcode output. Do not mix a legacy frame-processor tutorial with the current API. Installation, barcode scanner. 4. Authored acceptance checklist: permission denied, permission granted, one printed code, one screen-displayed code, duplicate callback handling, leaving/reopening the screen and a release build on each target OS. Record the payload and whether the handler fires once per accepted scan. Validate the payload before opening a link or performing an action.
The problem
A QR feature usually needs permission, a preview and one callback. Advanced photo/video control or image processing can justify owning a more complex native camera setup.
Versions, licences and limits — dated snapshots
| Option | Stable basis | Cost and platform limits |
|---|---|---|
| expo-camera | As of November 2026, stable Expo reference recommends ~58.0.14; MIT | No package licence fee; included in Expo Go; native camera testing requires a device; only one active camera preview |
| VisionCamera | As of November 2026, latest release 5.2.4; MIT; scanner companion at the same tag is 5.2.4 | No package licence fee; no Expo Go or Web support in the vendor comparison; native build and additional scanner dependency |
Sources: Expo reference, Expo licence, VisionCamera releases, licence, scanner package at release tag, vendor comparison. Build-service charges and engineering time are separate; no paid build-service price is assumed.
When to pick which
| Option | Wins | Loses | Pick this if |
|---|---|---|---|
| expo-camera | Standard QR capture and an Expo-compatible workflow | You need camera outputs or controls absent from its API | The deliverable is a straightforward scanner screen |
| VisionCamera | Custom camera outputs, frame processing and deeper native camera control | A native rebuild and extra dependencies add work without a required feature | You can name the required advanced capability |
Capabilities come from the vendor comparison; the recommendation is an engineering judgment, not a measured performance ranking.
Community evidence
benclanet, 2025-03-09: “After opening and closing a modal 2–3 times”, the development build crashed, Expo #35386. Historical lifecycle evidence; Expo Go behavior did not establish release-build behavior.antoinerousseau, 2026-04-30: “onBarcodeScanned is never called!”, Expo #44491. That commenter later reported recovery after updating; this does not establish that the current stable package is affected.
Recommendation by constraint
Solo: expo-camera. Small team: expo-camera unless a named requirement needs VisionCamera. Enterprise camera product: evaluate VisionCamera against the actual device fleet and native build ownership; enterprise size alone is not a reason to switch.
Agent prompt
Build one scanner screen using the selected library’s current stable API. Report SDK/package versions and physical-device results for permission denial, duplicate scans, navigation away/back and a release build. Do not change libraries until a required capability is missing.
Mistakes
Do not use Expo Go as the only acceptance environment. Do not leave multiple previews mounted. Do not process the same payment or login code repeatedly because the callback repeats.
Limits
No camera build, device scan, native size measurement or throughput benchmark was run. Two Expo reports provide historical caution; Evidence: none found for a current direct comparison of both stable libraries on the same device. checked 2026-10-28.
Started from a post by @Expo, packaged by the editor. Original post