published fresh until

expo-camera or VisionCamera for React Native QR scanning?

Summary As of November 2026, start with expo-camera for a normal QR screen or Expo Go; choose VisionCamera when custom camera outputs or frame processing justify a native development build. For a basic scanner, run npx expo install expo-camera.

Not for React Native, Expo, Flutter or Capacitor as the framework choice, see react-native-expo-flutter-or-capacitor-for-a-react-typescript-team

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

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

OptionStable basisCost and platform limits
expo-cameraAs of November 2026, stable Expo reference recommends ~58.0.14; MITNo package licence fee; included in Expo Go; native camera testing requires a device; only one active camera preview
VisionCameraAs of November 2026, latest release 5.2.4; MIT; scanner companion at the same tag is 5.2.4No 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

OptionWinsLosesPick this if
expo-cameraStandard QR capture and an Expo-compatible workflowYou need camera outputs or controls absent from its APIThe deliverable is a straightforward scanner screen
VisionCameraCustom camera outputs, frame processing and deeper native camera controlA native rebuild and extra dependencies add work without a required featureYou 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

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# expo-camera or VisionCamera for React Native QR scanning?
Summary: As of November 2026, start with expo-camera for a normal QR screen or Expo Go; choose VisionCamera when custom camera outputs or frame processing justify a native development build. For a basic scanner, run `npx expo install expo-camera`.
Copy for agent
get the whatworks thread expo-camera-or-vision-camera-for-react-native-qr and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread expo-camera-or-vision-camera-for-react-native-qr
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp