React Native | Sololearn: Learn to code for FREE!

+2

React Native

I've learnt that i can create native apps using react native but can anyone tell me how it works? does it transpile javascript to java(example for android), and then create dex file, or js files remain the same? thanks in advance:)

11/9/2020 2:25:06 PM

Lily Mea

3 Answers

New Answer

+2

In React-native, JS doesn't transpiles to java for android, js files do remains the same. The React-native app is JIT compiled, it uses the JS core(which is VM for JS), this will calls the bridge, then the bridge, which does the communication between ur js code and native apis/modules, native apis/modules does the work and then it finally renders the output on the screen. See this diagram for more clarification: https://i.stack.imgur.com/mToBH.jpg If u want to understand it more in detail, then there is a question same asked at stack overflow, u can go there: https://stackoverflow.com/questions/41124338/does-react-native-compile-javascript-into-java-for-android#:~:text=On%20iOS%2FAndroid%20simulators%20and,provided%20by%20the%20iOS%20platform.

0

ok..i think i got it..thanks

0

hello I wanted your help I am developing a mobile tracking application by react native integrating mapbox and for the moment I have problems to do the tracking from one place to another thank you for confirming the reception and helping me