Thursday, June 23, 2022

React Native 0.69

We are excited to release a new version of React Native, 0.69.0. This version comes with several improvements for the New Architecture of React Native and new features: React 18 support & bundled Hermes. Read on to learn more!

Sections

React 18

We are delighted to share with you that React Native 0.69 is the first release to support React 18. React 18 has brought lots of improvements, like new hooks such as useId. Additionally, React 18 includes new concurrency features such as useTransition or full Suspense support.

On React Native 0.69, React 18 is enabled by default. However, if you have not migrated to the New Architecture, you will only be able to leverage the features that don't use concurrent rendering and concurrent features. The New Architecture has been built with concurrent rendering in mind but we cannot add that support for the old architecture.

You can learn more about the React 18 support in React Native here.

Bundled Hermes

Before this release, Hermes and React Native were released separately. That led to confusion on which version of Hermes is compatible with which version of React Native. To remedy this issue, starting with React Native 0.69 we will be shipping a compatible version of Hermes alongside React Native. Making this change will make using Hermes in React Native much more stable.

Using the proper version of Hermes is handled by React Native, however, make sure to follow the steps in the upgrade helper to ensure the integration works as intended. If you don't have Hermes enabled already, you can follow the steps here to do so. While we will continue supporting other JavaScript engines, we recommend everyone to migrate to Hermes to have the best experience and to make sure we can support you better.

Note that users on the New Architecture on Android will need to build Hermes from source. For building Hermes from source, Windows users will need to additionally follow these steps.

If you are interested to learn more about how React Native bundles Hermes works under the hood, you can check out the deep-dive documentation here.

New Architecture

We are continuing the roll-out of the New Architecture for both Android and iOS. If you have not migrated your app or library, yet, follow the steps here. You can also read the latest update on tools and resources for the New Architecture to learn more.

Highlights of 0.69

As mentioned above, the most important improvements in this release are centered around React 18 support and bundled Hermes. However, there have been other notable changes, including:

Breaking changes

There have also been a few breaking changes:

  • React Native CLI has been bumped to a new major version of 8.0:
    • link and unlink commands have been removed in the favour of autolinking
    • Deprecated initCompat has been removed, use init command instead
    • Removed deprecated run-android properties
    • Removed install and uninstall commands
    • Removed assets and hooks from react-native.config.js – you'll need to remove these properties from your config
    • podspecPath was removed from the iOS dependency config
    • Removed --project-path option from a run-ios
    • Changed iOS source directory detection from looking for an Xcode project to looking for a Podfile
  • Support for console.disableYellowBox has been dropped
  • Already deprecated prop types have been removed (cdfddb4dad, 3e229f27bc, 10199b1581)
  • removeListener, deprecated since RN 0.65, was removed from Appearance
  • If you were using SegmentedComponentIOS, you will now need to replace it with the third-party library, for example segmented-control (235f168574)

Upgrades

And we upgraded some of our dependencies:

You can check out the full list of changes in the changelog.

Acknowledgements

80 contributors with their 629 commits have helped to make this release possible - thanks everyone!

We are also thankful to the release testers, supporters, and everyone else who gave their feedback to ensure this release will be as stable as possible.



from Hacker News https://ift.tt/mP9O5tQ

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.