React Native v0.64.x released
0.64.x
React Native 0.64 brings opt-in Hermes support on iOS, enables Inline Requires by default in new projects, adds Proxy support to Hermes and upgrades to React 17. It also raises platform requirements: Android API 21+, Xcode 12, CocoaPods 1.10 and Node 12. Several long-deprecated APIs are removed.
Highlights
- Hermes opt-in on iOS: Hermes can now be used on iOS. Set
:hermes_enabled => trueinuse_react_native!in your Podfile and runpod install. Support is still early stage and remains opt-in while further benchmarking is done. - Inline Requires enabled by default: New projects'
metro.config.jsenablesinlineRequiresby default, delaying execution of JavaScript modules until they are used to improve startup time. This gives a performance benefit but slightly different JS execution order. - Hermes Proxy support and Chrome traces: Hermes is upgraded to version 0.7 with ES6 Proxy support, enabling compatibility with projects like react-native-firebase and mobx. You can also use the Performance tab in Chrome DevTools to visualize execution of apps running on Hermes.
- React 17: React Native now uses React 17. The main change for apps is the new JSX transform, so files no longer need to import React to use JSX.
- New APIs and props:
TextInputsupportsonPressInandonPressOut;DeviceEventEmitterandNativeEventEmittergainlistenerCount(). On Android:android_hyphenationFrequencyon Text,onProgressonImage,contentOffseton ScrollView,shadowColoron API level >= 28. On iOS:disableButtonsIndicesforActionSheetIOS. - Tooling and dependency updates: Flipper is bumped to 0.75.1 and Jest to 25. On Android, Gradle Wrapper is bumped to 6.7 and Android Gradle Plugin to 4.1.0. The iOS template is updated to Xcode 12 and sets
NSAllowsArbitraryLoadstofalseby default.
Breaking changes
- Android: support for API levels 16 through 20 is removed; minSDK is now 21+.
- Minimum supported Node version is now 12. Xcode 12 and CocoaPods 1.10 are required.
- Deprecated
CameraRollAPI andCheckBoxcomponent are removed. - The
DEPRECATED_sendUpdatedChildFramesprop is removed fromScrollView; on iOS,calculateChildFramesis removed fromRCTScrollView. - On
Image,onLoadevent objects'source.urlis renamed tosource.uri. On Android,onLoadandonErrorevent objects no longer have an extrauriproperty. once()andremoveCurrentListener()are removed fromDeviceEventEmitterandNativeEventEmitter.Text.viewConfigis no longer exported. On Android, the undocumented ColorAndroid function is removed.- Android: ReadableArray null annotations are fixed, possibly breaking Kotlin apps. The PlayTouchSound method is deleted from UIManagerModule and moved to SoundManagerModule.
Upgrading
- Set your Android minSDK to 21 or higher and make sure your environment uses Node 12+, Xcode 12 and CocoaPods 1.10.
- Replace uses of
CameraRoll,CheckBox,once()andremoveCurrentListener(), and updateImageonLoadhandlers to readsource.uri. - If you enable
inlineRequires, check for code that depends on module execution order, since modules now execute when first used. - To try Hermes on iOS, set
:hermes_enabled => truein your Podfile and runpod install. - Android:
UIManagerModule.getUIImplementationis deprecated and will not be part of the new architecture of React Native. - Compare template changes in the Upgrade Helper.
Patch releases
| Version | Released |
|---|---|
| 0.64.4 | 2022-11-07 |
| 0.64.3 | 2021-11-04 |
| 0.64.2 | 2021-06-03 |
| 0.64.1 | 2021-05-05 |
| 0.64.0 | 2021-03-12 |