Skip to content
Tutorials Center
My learning

Topics

Lesson 38 of 38 ยท Projects and Practice

Expo Practice and Interview Questions

Review Expo with common interview questions, short answers, runnable coding exercises (URL builder, retry, cache, push batching) and a final self-check quiz.

You have covered the whole path from data and storage to notifications, builds, updates, testing and performance. This last lesson is for practice: questions that come up in interviews and code reviews, and small coding exercises whose logic you can run here. Try to answer each question in your own words before reading the answer.

What runs on this site. Native features are read-only everywhere in this track. The exercises below use plain JavaScript, the part of mobile code that is the same everywhere.

Concept questions

Expo, React Native and the tools

What is the difference between Expo and React Native? React Native is the framework that renders native views from React components. Expo is a platform built around it: a managed project setup, a large set of modules (expo-camera, expo-secure-store...), the CLI, Expo Router, and cloud services (EAS) for builds, updates and submission.

Expo Go vs a development build? Expo Go is a prebuilt app with a fixed set of native modules, ideal for learning. A development build is your own app with your native dependencies and dev tools, needed as soon as you add a library Expo Go does not contain. See EAS Build profiles.

What is Continuous Native Generation? The ios/ and android/ folders are generated by prebuild from app.json/app.config.js and config plugins, so they are output, not source. You change native behavior with config, plugins and packages instead of editing the folders by hand.

What does npx expo install do that npm install does not? It picks the version of a package that matches your installed SDK, so native and JavaScript versions agree.

Data and networking

Where do you store a login token? In expo-secure-store, which uses the Keychain or Keystore. AsyncStorage is unencrypted. See storage.

Does fetch reject on a 404? No. It only rejects when no response arrives. Check response.ok yourself. Add timeouts with AbortController (networking).

Why SQLite instead of AsyncStorage for a list of records? Queries, sorting, indexes, transactions and much better performance with many rows (expo-sqlite).

What problem does TanStack Query solve? Caching, request sharing, background refetching, retries and mutation handling for server data, so you stop re-implementing loading and error flags in every screen (caching).

Notifications and background work

Local vs push notifications? Local ones are scheduled by the app on the device. Push ones are sent from a server through Expo, then APNs or FCM.

Why can't you test remote push in a simulator? A real device registration with Apple or Google is required.

Can you rely on background tasks running every 15 minutes? No. The OS decides based on battery, usage and rules, so design for best effort and always sync on app open (background tasks).

Release and quality

What can an OTA update change? JavaScript and bundled assets only, and only for binaries with the same runtime version (EAS Update).

What is a runtime version for? It labels the native layer so an update never reaches an incompatible binary. The fingerprint policy computes it from native inputs.

Are EXPO_PUBLIC_ variables secret? No. They are inlined into the bundle and readable by anyone with the app (app config).

How do you keep a long list smooth? FlatList or FlashList, stable keys, memoized light rows with stable callbacks, pagination and sized images (performance).

How would you test a screen that reads from a native module? Wrap the module, mock the wrapper, render with Testing Library, assert on visible text and test the error path too (testing).

Exercise 1: build a safe URL

Write buildUrl(base, path, params) that joins a base URL and a path with exactly one slash, skips undefined and null params, and encodes values. Try your own version before running the reference solution.

Node.js Solution: buildUrl

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with node:readline or process.stdin), it gets the next line from this box.

Note the edge case limit: 0: a careless if (value) check would drop it.

Typing "react" fires five key events. You want one request after the user pauses. Write debounce(fn, ms).

Node.js Solution: debounce

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with node:readline or process.stdin), it gets the next line from this box.

In a component, create the debounced function with useMemo (or useRef) so it keeps the same timer across renders, and cancel it in the effect cleanup.

Exercise 3: group notifications by day

Given an array of notification objects with ISO timestamps, return sections { title, data } for a SectionList, newest day first, newest item first inside a day.

Node.js Solution: group by day

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with node:readline or process.stdin), it gets the next line from this box.

For display you would convert to the user's local time zone first, since the day boundary depends on it.

Exercise 4: spot the bugs

Each snippet has a real, common mistake. Find it, then check the list below.

JSX
// A
useEffect(() => {
  fetch(url).then((r) => r.json()).then(setData);
}, []);

// B
<FlatList data={items} keyExtractor={(_, i) => String(i)} renderItem={({ item }) => <Row onPress={() => open(item)} item={item} />} />

// C
const token = process.env.SECRET_API_TOKEN;

// D
Notifications.scheduleNotificationAsync({ content: { title: 'Hi' }, trigger: { seconds: 5 } });
  • A: no response.ok check, no error handling, no cleanup or cancellation, and url is missing from the dependency array.
  • B: index keys break row identity when the list changes, and the inline arrow creates a new function per row, defeating memo.
  • C: variables without the EXPO_PUBLIC_ prefix are not available in app code (it is undefined), and a secret must never be in the app anyway; call your server.
  • D: no permission request before scheduling, no type on the trigger in current SDKs, and no Android channel for the notification.

Design questions

Practice explaining these aloud, with a diagram if you can:

  1. Design offline-first sync for a notes app (see the project).
  2. How would you ship a critical bug fix within an hour? OTA update to preview, test, promote to production, watch crash reports, plan a store build if native changes are needed.
  3. How do you structure environments (development, preview, production) with different backends and installable side by side? Variants in app.config.js, profile env, different identifiers, channels.
  4. A screen drops frames when scrolling a feed. Measure on a release build, check list props and memoization, image sizes, JS work during scroll, then re-measure.
  5. How do you make an app accessible? Roles, labels, large text support, contrast, touch targets of at least 44 points, screen reader testing.

Final self-check

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. Which package should hold an OAuth refresh token?

    Secrets belong in encrypted storage backed by the Keychain or Keystore.
  2. 2. A bug fix only touches a component's styles. What is the fastest safe delivery?

    JavaScript-only changes can be delivered over the air.
  3. 3. Which approach prevents duplicate local reminders when a user edits a habit?

    The same identifier replaces the earlier scheduled notification.
  4. 4. Which test query asserts that something is absent?

    queryBy returns null instead of throwing, so you can assert it is not there.
  5. 5. What is the best default for retrying failed network calls?

    Backoff protects the server and the battery; idempotence prevents duplicate effects.

Summary

  • Be ready to explain the trade-offs: SecureStore vs AsyncStorage vs SQLite, OTA vs store build, local vs push.
  • Practice small, pure functions (URLs, debounce, grouping, retry); they appear in real code and in interviews.
  • Learn to spot common bugs: missing ok checks, index keys, public secrets, unscheduled permissions.
  • Design answers should name failure modes: offline, interrupted, duplicated, rolled back.
  • Keep building: extend the three projects, add tests and ship one to a store.

Next: back to the Expo track