0

I am new to React Native and first of all it is the best framework for building cross platform applications using the JSX.

Few questions that are stinging me to know that:

  1. When we run the app created with react native, does it convert the Javascript code into native Java or Objective-C and then this native code is executed in the phone to run the app and get the output?
  2. When we pack the application created with the React Native, does we get the pure compiled native code in this file i-e .apk or ipa(same as created with pure Java or Objective-C)?

I am using the React Native application development method Native Code development(Android Studio + React Native + Virtual Device - followed the documentation on the React Native site).

Question #1 is already asked on the stack overflow but i am failed to understand because i am beginner in react native.

Please can some one answer my questions in simple and easy explanation? Again, please easy words explanation !!!

VishwaKumar
  • 3,371
  • 8
  • 39
  • 69
  • **Question #1 is already asked on the stack overflow but i am failed to understand because i am beginner in react native.** Isn't this true here too? – Rohit5k2 Sep 27 '18 at 12:09
  • https://stackoverflow.com/questions/41124338/does-react-native-compile-javascript-into-java-for-android –  Sep 27 '18 at 12:10
  • Possible duplicate of [Does React Native compile JavaScript into Java for Android?](https://stackoverflow.com/questions/41124338/does-react-native-compile-javascript-into-java-for-android) – Stephen Kennedy Sep 28 '18 at 12:55

2 Answers2

1

No, the React Native framework is native code, but your Javascript code is included in the build as Javascript and interpreted at runtime. This is how you're able to debug code changes without rebuilding your app, and use services like CodePush to deploy new Javascript bundles to already deployed binaries.

bmovement
  • 697
  • 4
  • 9
-1

Yes, react native is essentially a JS library built on top of Java and Objective-C, and compiles to native code.

AndrewTelkamp
  • 206
  • 1
  • 22