Site icon Fictionistic

Introduction to React Native 0.70

React native 0.70 featured image

Recently React native developers launch a new version of react native and they named it as react native 0.70. In this blog, we are going to discuss what is the difference that react native 0.70 has and how it differs from react native 0.69.

About React native 0.70

React Native 0.70 includes many changes as well as the ongoing deployment of the new React Native framework. Let’s take a closer look at what’s new and, more importantly, why it’s really important. This release includes various enhancements, including 

  1. A new unified setup for Codegen, 
  2. Hermes as the primary engine 
  3. Full CMake compatibility for Android builds
  4. Refresh the New Architecture documentation. 

Also Read | Flutter vs React Native: Which one will be best in 2023

Let’s take a look at all the features

1. A new unified setup for Codegen3

With React Native 0.70, there is a consistent approach to defining codegen specifications for both iOS and Android. Previously, the Android configuration had to be stored in a separate file. This enhancement offers component developers a more consistent experience when migrating their codebases to the new Architecture.

2. Hermes as the primary engine

React Native 0.70 is the first version to include Hermes, React’s own JS engine, and it is enabled by default. Hermes is a powerful JavaScript engine designed specifically for React Native 0.70. It was formerly an add-on that needed to be installed and activated separately when creating a React Native project. Hermes was included alongside React Native beginning with version 0.69, making it easier to stay up with the rest of the framework and easier to install and activate.

Why Hermes is better

The Hermes engine outperforms the default JavaScript engines on each platform in terms of performance and memory use. Many apps did not use the engine earlier because it had to be set up and installed separately. While Hermes is the default engine, the 0.70 release will bring a significant performance increase to React Native apps. If you already have an app and have not yet activated Hermes, it is well worth the effort to do so and get the performance advantages.

3. Full CMake compatibility for Android builds

Users can now use CMake to customize their Native builds as of React Native 0.70. With the integration of Cmake, you can use a CMake Lists.txt file instead of an Android.mk file in your project for anything Android/Native-related. 

This CMake file generated by your app is significantly smaller. This means less code to maintain on your end and a simpler update experience across all React Native versions in the future.

Despite the fact that apps can use either Android.mk or CMake files for free, CMake files are the preferred method in the future.

4. Refresh the New Architecture documentation.

You may discover migration guidelines, examples, and tutorials in the new section to get started. Along with it, there are new documents delving into why a new architecture is needed and its many components. This helps you understand why the new APIs were created.

How to upgrade from React native 0.69 to React Native 0.70

Upgrading React Native can be difficult because modifications are sometimes required in a variety of areas, such as the Android and iOS build files. The best way to upgrade a React Native project is to hire a React Native developer who helps you upgrade. Also, make sure to read the documentation, particularly the section on migrating to the new architecture. The new architecture is becoming easier to use with each react native update release, but it’s still important to be aware of the changes and how they may affect your specific application.

Exit mobile version