react-native-expo-pitfalls
Step 6 of the pipeline (WORKFLOW.md), for the traps that are specific to Expo projects. The premise: a React
Native app fails in the gap between the JavaScript you edit and the native binary already installed: a package
version the SDK does not know, a variable inlined at build time, a screen decided before storage has loaded, an
update that no installed build can receive. Store submission is in mobile-release; Flutter is in flutter-conventions.
When
- A project has an
expo dependency, or the request names Expo, EAS or an expo-* package.
- No Expo dependency, but the app is a mobile shell around JavaScript code and stores a token or key, reads a cache when the network fails, or decides on a device clock: read §2 only.
- A package is added, an SDK is upgraded, or a screen that loads data is written.
- A secret, a token or a persisted flag is stored.
- A change is meant to ship without a new binary.
Skip when the project has no expo dependency and no mobile shell at all (a plain web app). Where there is no Expo dependency, say "not applicable: no Expo dependency" for §1 and §3 and do not invent a finding there; §2 is framework-neutral and still applies to a shell around web code.
Steps
Read only the section the task meets. They are independent.
| § |
Covers |
Read it when |
File |
| 1 |
SDK detection, installs, routes folder, platform files, native folders |
a project is opened, a package or file is added |
01-project-and-dependencies.md |
| 2 |
Four screen states, hydration, saves, offline, storage, public variables |
a screen loads data, or anything is persisted or configured |
02-data-storage-and-config.md |
| 3 |
Development build or Expo Go, SDK upgrade, over-the-air updates |
a native dependency changes, an upgrade or an update is planned |
03-builds-upgrades-and-updates.md |
Output / checkpoint
Each section ends with its own checks. For a change touching this block: the SDK was read before any
version-specific advice, packages came in through the SDK-aware installer, no secret sits in a public variable,
no screen decides on unhydrated state, and every update claim names the platform and runtime version it covers.
Guardrails
- Expo projects only: install packages with the SDK-aware installer, never with a bare package-manager add (§1.2). Never pin a version from memory.
- Expo projects only: put nothing but routes in the routes folder (§1.3).
- Never store a token in plain key-value storage, and never put a secret in a public variable (§2, storage and public variables).
- Expo projects only: publish to a production channel only on an explicit request that names channel, platform and runtime version (§3.4).
- Expo projects only: never promise that an update can add native code to an installed build (§3.3).
- When a check does not apply, write "not applicable: " and stop; never invent a finding to fill a section.
- Facts are given for the SDK range named in each section at the stamped commit; nothing here was run on a device (🟡).
Origin
Rewritten from the expo/skills repository (MIT, commit 7ddc1f5), read 2026-10-20. Version-bound facts and own
guidance are listed in references/origin.md.
1---2name: react-native-expo-pitfalls3description: "Use when writing or reviewing a React Native app built with Expo, or, for §2 only, any mobile app that wraps web code or JavaScript (React Native without Expo, a web view shell) and persists a token, caches data or falls back offline: project layout and Expo Router, installing packages against the SDK, data fetching and offline states, token and key-value storage, EXPO_PUBLIC variables, development builds against Expo Go, SDK upgrades, and over-the-air updates with runtime versions and channels."4metadata:5 source: https://skillmd.com/skills/techmefr/react-native-expo-pitfalls6---78# react-native-expo-pitfalls910Step 6 of the pipeline (`WORKFLOW.md`), for the traps that are specific to Expo projects. The premise: **a React11Native app fails in the gap between the JavaScript you edit and the native binary already installed**: a package12version the SDK does not know, a variable inlined at build time, a screen decided before storage has loaded, an13update that no installed build can receive. Store submission is in `mobile-release`; Flutter is in `flutter-conventions`.1415## When16- A project has an `expo` dependency, or the request names Expo, EAS or an `expo-*` package.17- No Expo dependency, but the app is a mobile shell around JavaScript code and stores a token or key, reads a cache when the network fails, or decides on a device clock: read §2 only.18- A package is added, an SDK is upgraded, or a screen that loads data is written.19- A secret, a token or a persisted flag is stored.20- A change is meant to ship without a new binary.2122**Skip when** the project has no `expo` dependency and no mobile shell at all (a plain web app). Where there is no Expo dependency, say "not applicable: no Expo dependency" for §1 and §3 and do not invent a finding there; §2 is framework-neutral and still applies to a shell around web code.2324## Steps2526**Read only the section the task meets.** They are independent.2728| § | Covers | Read it when | File |29|---|---|---|---|30| 1 | SDK detection, installs, routes folder, platform files, native folders | a project is opened, a package or file is added | [`01-project-and-dependencies.md`](./references/01-project-and-dependencies.md) |31| 2 | Four screen states, hydration, saves, offline, storage, public variables | a screen loads data, or anything is persisted or configured | [`02-data-storage-and-config.md`](./references/02-data-storage-and-config.md) |32| 3 | Development build or Expo Go, SDK upgrade, over-the-air updates | a native dependency changes, an upgrade or an update is planned | [`03-builds-upgrades-and-updates.md`](./references/03-builds-upgrades-and-updates.md) |3334## Output / checkpoint35Each section ends with its own checks. For a change touching this block: the SDK was read before any36version-specific advice, packages came in through the SDK-aware installer, no secret sits in a public variable,37no screen decides on unhydrated state, and every update claim names the platform and runtime version it covers.3839## Guardrails40- Expo projects only: install packages with the SDK-aware installer, never with a bare package-manager add (§1.2). Never pin a version from memory.41- Expo projects only: put nothing but routes in the routes folder (§1.3).42- Never store a token in plain key-value storage, and never put a secret in a public variable (§2, storage and public variables).43- Expo projects only: publish to a production channel only on an explicit request that names channel, platform and runtime version (§3.4).44- Expo projects only: never promise that an update can add native code to an installed build (§3.3).45- When a check does not apply, write "not applicable: <reason>" and stop; never invent a finding to fill a section.46- Facts are given for the SDK range named in each section at the stamped commit; nothing here was run on a device (🟡).4748## Origin49Rewritten from the `expo/skills` repository (MIT, commit 7ddc1f5), read 2026-10-20. Version-bound facts and own50guidance are listed in [`references/origin.md`](./references/origin.md).