Expo SDK 41 targets Android 11 and recommends Reanimated v2
Expo has released SDK 41. It keeps React Native 0.63, the same version used in SDK 40, but brings platform updates, library upgrades, a substantially smaller expo package and a batch of Expo CLI improvements. Snack support is expected later in the week.
Platform and library updates
Android apps now target Android R (11 / SDK 30), which changes behavior around location permissions, the media library (related to StorageAccessFramework) and constants. These changes also affect SDK 40 and older projects running in Expo Go, though not standalone apps built on those versions.
The recommended react-native-reanimated version is now v2. Using v2 features requires adding the Reanimated v2 Babel plugin, while v1 APIs (such as those used by React Navigation v5) keep working without it. Apps using v2 APIs lose remote JS debugging; debugging then requires Flipper and Hermes, neither of which is fully supported in the managed workflow yet.
lottie-react-native moves to 3.5.0, and react-native-screens v3 enables screens by default, with enableScreens(false) available as an opt-out. React Navigation v4 users need the latest v4 patch release.
The expo package is now 93% smaller in production, with legacy code removed and better tree-shaking via @expo/metro-config. Much of the cycle also went into the underlying changes needed to support EAS Build for managed projects, with official support still to be announced.
Expo CLI
- After
expo start, pressingmtoggles the dev menu,shift+Mopens the performance monitor or element inspector, andrreloads all connected devices, simulators and browsers. - Creating an empty
tsconfig.jsonand runningexpo startsets up TypeScript automatically. - Error output is more concise, with improved source maps and muted generated-code traces.
expo configdisplays the evaluatedapp.config.jsorapp.json.- App Store Connect interactions offer faster authentication and clearer error handling.
- Config Plugins enter beta, giving library authors a path to bring native modules into the Expo ecosystem.
The --target flag is deprecated for SDK 41+: update bundles now adapt to managed or bare environments at runtime, provided that the native runtime is compatible. The --config flag is deprecated in favor of app.config.js, but stays supported for existing use cases.
Breaking changes
- Deprecated globals are removed, so
expo-linear-gradient,expo-linking,expo-location,expo-permissionsandexpo-sqliteare no longer installed by default. Projects that used the globals should install the respective package and import from it instead, e.g.import { LinearGradient } from 'expo-linear-gradient';. .expofile extensions are no longer recognized.expo-permissionsis deprecated in favor of module methods such asCamera.requestPermissionsAsync().@react-native-community/async-storagebecomes@react-native-async-storage/async-storage; imports can be updated withnpx expo-codemod sdk41-async-storage [your-source-directory].@expo/metro-configis vendored asexpo/metro-config.- The legacy Notifications API is removed in favor of
expo-notifications. - iOS 10 is no longer supported; SDK 41 requires iOS 11+.
SDK 37 has reached end of life, SDK 38 will be dropped in the next release (planned for June/July 2021), and Node 10 support in Expo CLI is ending soon.
Upgrading
Install the latest CLI with npm i -g expo-cli (expo-cli@4.4.1 or greater) and run expo upgrade. Bare workflow projects also need CocoaPods 1.10.0 or greater and a native rebuild with npm run ios and npm run android. Standalone apps need a new build via expo build:ios or expo build:android.
Links
Source: web.archive.org