Skip to the page

Native code and libraries in Expo · mid

Expo libraries: images, camera, files and media

For media and files, Expo apps use expo-image (cached images with placeholders), expo-camera (CameraView with permission hooks and barcode scanning), the object-based expo-file-system API (File, Directory, Paths), and expo-audio / expo-video, which replaced the removed expo-av.

The notes

What you must know

  • expo-image: SDWebImage (iOS) / Glide (Android); cachePolicy "disk" by default ("memory", "memory-disk", "none"); placeholder with blurhash or thumbhash; contentFit (default "cover"); recyclingKey for FlashList cells; Image.prefetch, clearDiskCache, clearMemoryCache; useImage hook.
  • expo-camera: CameraView with useCameraPermissions / useMicrophonePermissions; barcodeScannerSettings + onBarcodeScanned. Only one camera preview can be active at a time, so unmount it when the screen loses focus. For heavy frame processing use VisionCamera v5.
  • expo-file-system: the object API became the default in SDK 54 — File, Directory, Paths.document, Paths.cache; File implements Blob; text() / textSync(); downloads with File.createDownloadTask (progress, cancel) and uploads with createUploadTask. The old API lives at expo-file-system/legacy. SDK 56 made copy()/move() async and SDK 58 made File.write() async.
  • expo-av was deprecated in SDK 53 and removed in SDK 55; use expo-audio and expo-video.
  • SDK 56 made expo/fetch the global fetch (opt out with EXPO_PUBLIC_USE_RN_FETCH=1).

The red pen

Common traps: mistake → fix

  • Mistake: "FileSystem.readAsStringAsync from expo-file-system"

    Fix: that is the legacy API, now at expo-file-system/legacy.

  • Mistake: "Keep the camera mounted on a hidden tab"

    Fix: only one preview can be active; unmount on blur.

  • Mistake: "Use expo-av for a new video player"

    Fix: removed; use expo-video.

Easy to hard

Questions interviewers ask, easy to hard

  1. Build a fast image grid with placeholders and caching. Which props?
  2. Build a QR scanner screen: permissions, focus handling, duplicate scans.
  3. Download a 200 MB file with progress and a cancel button.
  4. What replaced expo-av?

Explain it out loud

Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.

Practise by voice

Your first interview is free

Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.

Start your free interview