The original link

React Native’s 0.60 release comes after months of work by hundreds of contributors. This release completes some major migrations for the Android and iOS platforms and resolves many issues. This article focuses on some of the highlights of this release.

Focus on accessibility

There are many improvements to the accessibility API, such as announceForAccessibility, as well as improvements to roles, action support, flags, and more. Accessibility is a complex science, but we expect these improvements to be closer to A11Y[1]. Check out the React Native Open Source Update June 2019[2] for more details on these changes.

New launch page

React Native’s startup screen has been updated! This new launch page will welcome users to the React Native ecosystem in a more friendly and engaging way.

Support AndroidX

AndroidX is a significant step forward for the Android ecosystem, and the older support libraries have been deprecated. React Native 0.60 has been migrated to AndroidX. This is a disruptive change, and your native code and dependent libraries will also need to be migrated.

Although you need to migrate your native code, the Jetifier tool can be used to patch node_modules. Library maintainers need to upgrade, but this tool provides a temporary solution to give maintainers time to release AndroidX versions. So if you find bugs related to AndroidX migration, please give this tool a try.

CocoaPods is used by default

CocoaPods is now part of the React Native iOS project [3]. Be sure to open the iOS platform code using the xcWorkspace file from now on (tip: Try xed iOS in the root project directory). In addition, the Podspecs of the internal packages have been changed to make them compatible with Xcode projects, which will help with troubleshooting and debugging. As part of the upgrade to 0.60, expect to make some immediate changes to your Podfile to introduce this exciting support option. Note that we know use_frameworks! For compatibility issues, we are considering workarounds and future patches.

Remove the Lean Core

WebView and NetInfo were previously extracted into a separate REPO, and in 0.60 we completed migrating them from the React Native repO. In addition, Geolocation is extracted in response to community feedback on the new App Store strategy. If you have not already done so, migrate by adding dependencies to the react-native webView, @react-native community/netinfo, and @react-native community/geolocation. If you want an automated solution, consider using RN-upgrade-deprecated -modules.

Native Modules are now automatically linked

The React Native CLI team has made major improvements to the Native Module link called Autolinking [4]! The React-Native Link is no longer required for most scenarios. At the same time, the team overhauled the entire linking process. Be sure to use the React-Native Unlink to remove pre-existing dependencies, as described in the documentation above.

Upgrade Helper

@Lucasbento, @pvinis, @Kelset and @Watadarkstar have built a powerful tool called Upgrade Helper to make the Upgrade process easier. It helps React Native users see changes between versions using the Brownfield app or complex custom Settings. For details, see the updated upgrade documentation [5].

Note to library maintainers

AndroidX changes will almost certainly require updating your libraries, so be sure to add support soon. If you haven’t been able to upgrade, consider using Jetifier to check your library to make sure users can patch your library at build time.

Check the Autolinking documentation to update your configuration and readme files. Depending on how you previously integrated the library, you may also need to make some additional changes. Check the dependency guide in the CLI for information on how to define the dependency interface.

summary

While these are the bright spots we noticed, there are many other exciting things. To see all the updates, review the change log [6].

reference

  • [1]a11yproject.com/
  • [2] facebook. Making. IO/react – nativ…
  • [3] github.com/react-nativ…
  • [4] github.com/react-nativ…
  • [5] facebook. Making. IO/react – nativ…
  • [6] github.com/react-nativ…

Pay attention to our

Welcome to follow our official account: Knowledge Set (ID: ZSXjtip), and also welcome to join our group to discuss issues. Add coldlight_HH/wSY9871 to our iOS/ FLUTTER wechat group.