Expo SDK 48: Hermes by default, React Native 0.71.3, Expo Router v1.0
Expo has released SDK 48, which bundles React Native 0.71.3 and React 18.2.0. The release changes the default JavaScript engine, brings two libraries to v1.0, and adds new EAS Build tooling.
Hermes is now the default
As announced with SDK 47, Hermes replaces JavaScriptCore (JSC) as the default engine. Teams that need more time for performance or regression testing can keep JSC by setting the jsEngine field in app.json / app.config.js. Expo notes the debugging experience is much better with Hermes: "Open JS Debugger" opens the Hermes inspector in Chrome DevTools, which supports the New Architecture / JSI, unlike remote Chrome debugging with JSC.
React Native 0.71.3
The layout engine now supports the Flexbox properties gap, rowGap and columnGap. The release also adds web-inspired props for accessibility, styles and events, and speeds up Hermes' JSON.parse. TypeScript users should remove @types/react-native from their dependencies, since types now ship with react-native.
Platform and module changes
- Android
compileSdkVersionandtargetSdkVersionare set to API level 33 across all Expo modules, ahead of Google Play's 2023 deadlines. - Expo Go now renders projects right-to-left on RTL locales when enabled in app config.
- All Expo packages except
expo-dev-clientsupport the New Architecture/Fabric; Expo Go does not. Expo does not yet recommend it for production apps, but a starter is available vianpx create-expo-app@latest -e with-new-arch. expo-randomis merged intoexpo-crypto, which now offersgetRandomValues,randomUUIDanddigest, compliant with the Web Crypto API.expo-randomis deprecated.- The Expo Modules API gains Swift Concurrency (async/await) support and preliminary
TypedArraysupport.
Expo Image and Expo Router v1.0
Expo Image is a cross-platform image component positioned as a successor to React Native's <Image> and an alternative to react-native-fast-image, with built-in placeholders, transitions and blurhash support. It is now available in Expo Go.
Expo Router, a filesystem-based router built on React Navigation, is now used by default in the tabs template (npx create-expo-app --template tabs). Expo cautions it may not fit every use case yet.
EAS Build
M1 workers are the default for iOS builds in SDK 48 projects. eas build:resign re-signs an existing .ipa with a new ad hoc provisioning profile, avoiding a full rebuild when adding test devices. eas build:run downloads, installs and runs simulator/emulator builds, with --platform, --id and --latest options.
Deprecations and support
entryPoint is removed from app config (use main in package.json), and useProxy is deprecated in expo-auth-session. Classic Updates and expo publish are being sunset, with publishing supported until 2024. A known regression affects getAssetsAsync() from expo-media-library in the App Store version of Expo Go for iOS. SDK 45 is dropped from Expo Go, and SDK 46 and 47 will be dropped next release.
Upgrading
npm i -g eas-cli
npm install expo@^48.0.0
npx expo install --fix
npx expo-doctor
Xcode 14 or newer is required. Bare projects should consult the React Native Upgrade Helper and update the Android Gradle Plugin to 7.4.1. Development builds using expo-dev-client need to be rebuilt.
Links
Source: web.archive.org