Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit 5e29efa

Browse files
committed
Fix typo + add marco as author 🚀
1 parent 1147134 commit 5e29efa

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

_data/authors.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,7 @@ felice_giovinazzo:
3434
name: Felice Giovinazzo
3535
url: https://www.linkedin.com/in/felice-giovinazzo-17277b55/
3636
image: /assets/images/felice-giovinazzo.jpg
37+
marco_delucchi:
38+
name: Marco De Lucchi
39+
url: https://www.linkedin.com/in/marcodelucchi/
40+
image: /assets/images/marco-delucchi.jpg

_images/marco-delucchi.jpg

3.77 KB
Loading

_posts/2020-01-18-react-native-activate-hermes.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ comments: true
99
math: false
1010
seo:
1111
- type: "BlogPosting"
12-
authors: [fabrizio_duroni]
12+
authors: [fabrizio_duroni, francesco_bonfadelli, marco_delucchi]
1313
---
1414

1515
*React native 0.60.4 has a new cool feature for Android: a new JavaScript engine called Hermes. Let's see how you can turn it on in your React Native application to get all its benefits.*
16-
16+
As you already my know
1717
---
1818

19-
As you already my know, there has been some complains in the past related to the performance of React Native on the Android platform. One of the main reason was due to a big difference in the React Native architecture implementation between Android and iOS: the JavaScript engine used to execute your code. On iOS React Native uses the [JavaScript Core engine exposed in the iOS SDK](https://developer.apple.com/documentation/javascriptcore). On Android the SDK doesn't offer the same feature, so the React Native Android implementation embed a compiled version of the JavaScript Core engine. AS a consequence of this fact the engine used on Android didn't receive the regular updates that the iOS counterpart receive on each system major update, and was also not optimized for React Native and generally speaking for executing JavaScript code for mobiles apps. This is the reason way the Facebook React Native team decided to create [Hermes, an open source JavaScript engine optimized for mobile apps](https://engineering.fb.com/android/hermes/).
20-
Which benefits brings to the table this new Engine? As reported in the blog presentation post, there were a few key metrics kept in consideration by the Facebook React Native team:
19+
As you already may know, there has been some complains in the past related to the performance of React Native on the Android platform. One of the main reason was due to a big difference in the React Native architecture implementation between Android and iOS: the JavaScript engine used to execute your code. On iOS React Native uses the [JavaScript Core engine exposed in the iOS SDK](https://developer.apple.com/documentation/javascriptcore). On Android the SDK doesn't offer the same feature, so the React Native Android implementation embeds a compiled version of the JavaScript Core engine. As a consequence of this fact the engine used on Android didn't receive the regular updates that the iOS counterpart received on each system major update, and was also not optimized for React Native and generally speaking for executing JavaScript code for mobiles apps. This is the reason why the Facebook React Native team decided to create [Hermes, an open source JavaScript engine optimized for mobile apps](https://engineering.fb.com/android/hermes/).
20+
Which benefits does the new Engine bring to the table? As reported in the presentation blog post, there were a few key metrics kept in consideration by the Facebook React Native team:
2121

2222
>For JavaScript-based mobile applications, user experience benefits from attention to a few primary metrics:
2323
>
@@ -61,8 +61,8 @@ In the [official documentation](https://facebook.github.io/react-native/docs/her
6161
at java.lang.Thread.run(Thread.java:761)
6262
```
6363

64-
As the error says, the compilation is failing because gradle is not able to find one the shared libraries used by Hermes. If think well we are also missing a part in our setup: we said that React Native contains a compiled version of Hermes, but we are not telling to gradle where it can pick the `aar` file that contains it. Let's fix this problem also with the help of the [React Native upgrade tool](https://react-native-community.github.io/upgrade-helper/).
65-
First we need to had to the `repository` section in the main gradle file a new maven repository (that is contained in the node_modules of the app).
64+
As the error says, the compilation is failing because gradle is not able to find one the shared libraries used by Hermes. If you think well we are also missing a part in our setup: we said that React Native contains a compiled version of Hermes, but we are not telling to gradle where it can pick the `aar` file that contains it. Let's fix this problem also with the help of the [React Native upgrade tool](https://react-native-community.github.io/upgrade-helper/).
65+
First we need to add to the `repository` section in the main gradle file a new maven repository (that is contained in the node_modules of the app).
6666

6767
```groovy
6868
//....
@@ -90,7 +90,7 @@ releaseImplementation files("../../node_modules/hermes-engine/android/hermes-rel
9090
//...
9191
```
9292

93-
As you can see from above we needed to link the `aar` version of Hermes specifically for each build variant we have. We also need to rename our `qa` flavor to `qaRelease` and link it to the `hermes-release.aar` file. Why? Because our QA build configuration inherits from the release one, and the **`react.gradle` contained in the React Native itself (`node_modules/react-native/react.gradle`)** does some checks based on the flavor name and if it contains `release` it does some additional operation for apps with Hermes enabled related to the generation of the sourcemap and the removal of the debugger libraries (not needed for a release build). Below you can find the parts that do checks on the variant name.
93+
As you can see from above we needed to link the `aar` version of Hermes specifically for each build variant we have. We also need to rename our `qa` flavor to `qaRelease` and link it to the `hermes-release.aar` file. Why? Because our QA build configuration inherits from the release one, and the **`react.gradle` contained in the React Native itself (`node_modules/react-native/react.gradle`)** does some checks based on the flavor name and, if it contains release, it performs some additional operations for apps with Hermes enabled related to the generation of the sourcemap and the removal of the debugger libraries (not needed for a release build). Below you can find the parts that do checks on the variant name.
9494

9595
```groovy
9696
//...

assets/images/marco-delucchi.jpg

3.08 KB
Loading

0 commit comments

Comments
 (0)