When the Expo SDK is upgraded, the apps in examples/ are recreated from a fresh Expo template instead of being upgraded in place. You then copy back the files that are specific to this repo.
- Move the current app to
/tmpso you can restore files from it. - Generate a fresh app in
/tmp(commands below). - Copy the fresh app into
examples/, then delete its.gitandnode_modules. - Restore the repo-specific files listed below.
- Update
package.jsonandapp.jsonwith the repo's app name, scripts, and dependencies. - Run
yarn install, then validate (see the end of this page).
Keep the existing image assets unless the new SDK requires different ones.
yarn create expo-app /tmp/rntl-basic-fresh --template blank-typescript --yesRestore: App.tsx, components/, __tests__/, theme.ts, jest.config.js, jest-setup.ts, babel.config.js, eslint.config.mjs, README.md, AGENTS.md, .expo-shared/assets.json, and assets/. Keep the new index.ts.
yarn create expo-app /tmp/rntl-cookbook-fresh --example with-router --yesRestore: app/, the tutorial folders (basics-tutorial/, basics-tutorial-react-strict-dom/), theme.ts, jest.config.js, jest-setup.ts, babel.config.js, eslint.config.mjs, README.md, AGENTS.md, .expo-shared/assets.json, and assets/. Keep the new Expo Router setup.
Run these from inside the app folder:
yarn expo install --check
yarn lint
yarn typecheck
yarn test --watchman=falseIf the new template causes a lot of yarn.lock churn, restore the old yarn.lock and run yarn install again.